mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
Cc: dledford@redhat.com, oulijun@huawei.com, xavier.huwei@huawei.com,
	huangdaode@hisilicon.com, yankejian@huawei.com,
	xieqianqian@huawei.com, weiyongjun1@huawei.com,
	yisen.zhuang@huawei.com, salil.mehta@huawei.com,
	sean.hefty@intel.com, hal.rosenstock@gmail.com,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [RESEND PATCH 1/3] net: hns: fix uninitialized data use
Date: Sat, 25 Mar 2017 20:05:46 -0700 (PDT)	[thread overview]
Message-ID: <20170325.200546.249222967254161798.davem@davemloft.net> (raw)
In-Reply-To: <20170324220250.2193128-3-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 24 Mar 2017 23:02:49 +0100

> When dev_dbg() is enabled, we print uninitialized data, as gcc-7.0.1
> now points out:
> 
> ethernet/hisilicon/hns/hns_dsaf_main.c: In function 'hns_dsaf_set_promisc_tcam':
> ethernet/hisilicon/hns/hns_dsaf_main.c:2947:75: error: 'tbl_tcam_data.low.val' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> ethernet/hisilicon/hns/hns_dsaf_main.c:2947:75: error: 'tbl_tcam_data.high.val' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 
> We also pass the data into hns_dsaf_tcam_mc_cfg(), which might later
> use it (not sure about that), so it seems safer to just always initialize
> the tbl_tcam_data structure.
> 
> Fixes: 1f5fa2dd1cfa ("net: hns: fix for promisc mode in HNS driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied.

  reply	other threads:[~2017-03-26  3:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 22:02 [RESEND PATCH 0/3] hisilicon hns warning fixes for gcc-7.0.1 Arnd Bergmann
2017-03-24 22:02 ` [RESEND PATCH 3/3] infiniband: hns: avoid gcc-7.0.1 warning for uninitialized data Arnd Bergmann
2017-04-25 19:19   ` Doug Ledford
2017-03-24 22:02 ` [RESEND PATCH 1/3] net: hns: fix uninitialized data use Arnd Bergmann
2017-03-26  3:05   ` David Miller [this message]
2017-03-24 22:02 ` [RESEND PATCH 2/3] net: hns: avoid gcc-7.0.1 warning for uninitialized data Arnd Bergmann
2017-03-26  3:05   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170325.200546.249222967254161798.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=arnd@arndb.de \
    --cc=dledford@redhat.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=huangdaode@hisilicon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oulijun@huawei.com \
    --cc=salil.mehta@huawei.com \
    --cc=sean.hefty@intel.com \
    --cc=weiyongjun1@huawei.com \
    --cc=xavier.huwei@huawei.com \
    --cc=xieqianqian@huawei.com \
    --cc=yankejian@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®