lkml.org 
[lkml]   [2020]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] i2c: sh_mobile: Fix compilation warning
On 29-05-20, 14:12, Wolfram Sang wrote:
> On Thu, May 09, 2019 at 10:13:46AM +0530, Viresh Kumar wrote:
> > This currently generates a warning:
> >
> > drivers/i2c/busses/i2c-sh_mobile.c: In function 'sh_mobile_i2c_isr':
> > drivers/i2c/busses/i2c-sh_mobile.c:399:26: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized]
> >
> > Though the code looks okay and shouldn't ever use the variable
> > uninitialized.
> >
> > Fix the warning by moving the code around and getting rid of 'data'.
> >
> > Compile tested only.
> >
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>
> Tested on a Renesas Lager board (R-Car H2). Dumping register sets
> produces identical results.
>
> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> And code is actually cleaner now.
>
> Applied to for-next, thanks!
>

Almost after an year, wondering on how you reached this patch now :)

--
viresh

\
 
 \ /
  Last update: 2020-06-01 06:01    [W:0.079 / U:2.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site