lkml.org 
[lkml]   [2018]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 05/11] thermal: tsens: Get rid of dead code
On Tue 28 Aug 06:38 PDT 2018, Amit Kucheria wrote:

> hw_id is dynamically allocated but not used anywhere. Get rid of dead
> code.
>
> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> Reviewed-by: Matthias Kaehlcke <mka@chromium.org>

Good catch.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
> drivers/thermal/qcom/tsens.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> index 90bb431cf740..9a8e8f7b4ae1 100644
> --- a/drivers/thermal/qcom/tsens.c
> +++ b/drivers/thermal/qcom/tsens.c
> @@ -80,11 +80,6 @@ static int tsens_register(struct tsens_device *tmdev)
> {
> int i;
> struct thermal_zone_device *tzd;
> - u32 *hw_id, n = tmdev->num_sensors;
> -
> - hw_id = devm_kcalloc(tmdev->dev, n, sizeof(u32), GFP_KERNEL);
> - if (!hw_id)
> - return -ENOMEM;
>
> for (i = 0; i < tmdev->num_sensors; i++) {
> tmdev->sensor[i].tmdev = tmdev;
> --
> 2.17.1
>

\
 
 \ /
  Last update: 2018-09-03 22:19    [W:0.152 / U:7.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site