* nes: uninitialized variable
@ 2011-03-25 0:00 Stephen Hemminger
2011-03-25 0:15 ` Roland Dreier
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2011-03-25 0:00 UTC (permalink / raw)
To: Maciej Sosnowski, Roland Dreier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
This commit:
commit 2a4c97ead4b375a64063523210939b87ad225b85
Author: Maciej Sosnowski <maciej.sosnowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Date: Wed Nov 24 17:29:30 2010 +0000
RDMA/nes: Fix bonding on iw_nes
Enable configuring bonds on nes devices by adding missing support for
master net_device to the driver.
Signed-off-by: Maciej Sosnowski <maciej.sosnowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
introduced:
drivers/infiniband/hw/nes/nes_cm.c: In function ‘nes_addr_resolve_neigh’:
include/linux/netdevice.h:2586: warning: ‘netdev’ may be used uninitialized in this function
drivers/infiniband/hw/nes/nes_cm.c:1109: note: ‘netdev’ was declared here
here:
static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpindex)
{
struct net_device *netdev;
struct nes_adapter *nesadapter = nesvnic->nesdev->nesadapter;
rt = ip_route_output(&init_net, htonl(dst_ip), 0, 0, 0);
if (IS_ERR(rt)) {
printk(KERN_ERR "%s: ip_route_output_key failed for 0x%08X\n",
__func__, dst_ip);
return rc;
}
if (netif_is_bond_slave(netdev))
^^^^^^
netdev is not set!
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: nes: uninitialized variable
2011-03-25 0:00 nes: uninitialized variable Stephen Hemminger
@ 2011-03-25 0:15 ` Roland Dreier
[not found] ` <AANLkTi=PdMd+OZXDejON1Y=DJSEHxoAaq0GCPCnurz27-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Roland Dreier @ 2011-03-25 0:15 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Maciej Sosnowski, Roland Dreier,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, Jiri Pirko
On Thu, Mar 24, 2011 at 5:00 PM, Stephen Hemminger
<shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org> wrote:
> This commit:
> commit 2a4c97ead4b375a64063523210939b87ad225b85
Actually I think it was 1765a575334f ("net: make dev->master general")
which went in through the net tree and which had:
- if (nesvnic->netdev->master)
+ if (netif_is_bond_slave(netdev))
presumably that should be netif_is_bond_slave(nesvnic->netdev).
I'll queue this up:
RDMA/nes: Fix test of uninitialized netdev
Commit 1765a575334f ("net: make dev->master general") introduced a
test of an uninitialized netdev. Fix the code so the intended netdev
is tested.
Signed-off-by: Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
---
drivers/infiniband/hw/nes/nes_cm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/infiniband/hw/nes/nes_cm.c
b/drivers/infiniband/hw/nes/nes_cm.c
index ef32915..cfa3a2b 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1116,7 +1116,7 @@ static int nes_addr_resolve_neigh(struct
nes_vnic *nesvnic, u32 dst_ip, int arpi
return rc;
}
- if (netif_is_bond_slave(netdev))
+ if (netif_is_bond_slave(nesvnic->netdev))
netdev = nesvnic->netdev->master;
else
netdev = nesvnic->netdev;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-25 9:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-25 0:00 nes: uninitialized variable Stephen Hemminger
2011-03-25 0:15 ` Roland Dreier
[not found] ` <AANLkTi=PdMd+OZXDejON1Y=DJSEHxoAaq0GCPCnurz27-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-25 9:20 ` Sosnowski, Maciej
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox