lkml.org 
[lkml]   [2023]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] hwmon: HS3001: remove redundant store on division
On Mon, Oct 23, 2023 at 02:58:28PM +0100, Colin Ian King wrote:
> Currently the local variable hum is being divided by a constant and
> the results is being re-assigned back to hum before the value is being
> returned to the caller. The assignment to hum is redundant and can
> be removed.
>
> Cleans up clang scan build warning:
> drivers/hwmon/hs3001.c:65:9: warning: Although the value stored to 'hum'
> is used in the enclosing expression, the value is never actually read
> from 'hum' [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Applied.

Guenter

\
 
 \ /
  Last update: 2023-10-25 21:00    [W:0.035 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site