summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h
diff options
context:
space:
mode:
authorAlexander Lobakin <alobakin@marvell.com>2020-06-23 16:51:37 +0300
committerDavid S. Miller <davem@davemloft.net>2020-06-23 15:01:16 -0700
commit10f468ea5c481b3a60cc291c4dfdc7bb338abb74 (patch)
treea1964cede0de107f0ece102218c3ceeb0c80639b /drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h
parentc221dd1831732449f844e03631a34fd21c2b9429 (diff)
downloadlinux-10f468ea5c481b3a60cc291c4dfdc7bb338abb74.tar.bz2
net: qed: fix "maybe uninitialized" warning
Variable 'abs_ppfid' in qed_dev.c:qed_llh_add_mac_filter() always gets printed, but is initialized only under 'ref_cnt == 1' condition. This results in: In file included from ./include/linux/kernel.h:15:0, from ./include/asm-generic/bug.h:19, from ./arch/x86/include/asm/bug.h:86, from ./include/linux/bug.h:5, from ./include/linux/io.h:11, from drivers/net/ethernet/qlogic/qed/qed_dev.c:35: drivers/net/ethernet/qlogic/qed/qed_dev.c: In function 'qed_llh_add_mac_filter': ./include/linux/printk.h:358:2: warning: 'abs_ppfid' may be used uninitialized in this function [-Wmaybe-uninitialized] printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~ drivers/net/ethernet/qlogic/qed/qed_dev.c:983:17: note: 'abs_ppfid' was declared here u8 filter_idx, abs_ppfid; ^~~~~~~~~ ...under W=1+. Fix this by initializing it with zero. Fixes: 79284adeb99e ("qed: Add llh ppfid interface and 100g support for offload protocols") Signed-off-by: Alexander Lobakin <alobakin@marvell.com> Signed-off-by: Igor Russkikh <irusskikh@marvell.com> Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.h')
0 files changed, 0 insertions, 0 deletions