Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1302232

Re: [PATCH] net: hns: avoid uninitialized variable warning:

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH] net: hns: avoid uninitialized variable warning:
Date 2016-01-05 22:50 +0100
Message-ID <qNHEm-cI-11@gated-at.bofh.it> (permalink)
References <qMgmT-8i1-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] net: hns: avoid uninitialized variable warning: Arnd Bergmann <arnd@arndb.de> - 2016-01-01 23:30 +0100
  Re: [PATCH] net: hns: avoid uninitialized variable warning: David Miller <davem@davemloft.net> - 2016-01-05 22:50 +0100
    Re: [PATCH] net: hns: avoid uninitialized variable warning: Salil Mehta <salil.mehta@huawei.com> - 2016-01-06 16:40 +0100
  Re: [PATCH] net: hns: avoid uninitialized variable warning: Yisen Zhuang <Yisen.zhuang@huawei.com> - 2016-01-06 02:00 +0100
  Re: [PATCH] net: hns: avoid uninitialized variable warning: David Miller <davem@davemloft.net> - 2016-01-06 06:10 +0100

csiph-web