lkml.org 
[lkml]   [2016]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net: hns: avoid uninitialized variable warning:

On 1/5/2016 9:43 PM, David Miller wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Fri, 01 Jan 2016 23:27:57 +0100
>
>> gcc fails to see that the use of the 'last_offset' variable
>> in hns_nic_reuse_page() is used correctly and issues a bogus
>> warning:
>>
>> drivers/net/ethernet/hisilicon/hns/hns_enet.c: In function 'hns_nic_reuse_page':
>> drivers/net/ethernet/hisilicon/hns/hns_enet.c:541:6: warning: 'last_offset' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>
>> This simplifies the function to make it more obvious what is
>> going on to both readers and compilers, which makes the warning
>> go away.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>> Compile-tested only, and complex enough that this requires a proper
>> review and testing before it gets apply. Please have a look at this.
> If this goes yet another day without being reviewed, I'm just applying
> it.
>
> You hisilicon folks can't just let patches rot, you must review them
> in a timely manner or else I'm applying them without waiting for you
> to look at them.
Hi David and Arnd,
Apologies for the delay in response and the review. Most of us were on
the Annual Holidays and have just returned back.

Change looks good to me!

Best Regards
Salil




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