From: Hal Rosenstock Date: Mon, 2 Apr 2007 16:45:16 +0000 (-0400) Subject: IB/umad: Fix declaration of dev_map[] X-Git-Tag: v2.6.22-rc1~1126^2~47 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9a4b65e35714516980c863bfb7edc5f232b8b458;p=linux-2.6-omap-h63xx.git IB/umad: Fix declaration of dev_map[] The current ib_umad code never accesses bits past IB_UMAD_MAX_PORTS in dev_map[]. We shouldn't declare it to be twice as big. Pointed-out-by: Roland Dreier Signed-off-by: Hal Rosenstock --- diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c index c069ebeba8e..2ce3eead2ba 100644 --- a/drivers/infiniband/core/user_mad.c +++ b/drivers/infiniband/core/user_mad.c @@ -135,7 +135,7 @@ static const dev_t base_dev = MKDEV(IB_UMAD_MAJOR, IB_UMAD_MINOR_BASE); static DEFINE_SPINLOCK(port_lock); static struct ib_umad_port *umad_port[IB_UMAD_MAX_PORTS]; -static DECLARE_BITMAP(dev_map, IB_UMAD_MAX_PORTS * 2); +static DECLARE_BITMAP(dev_map, IB_UMAD_MAX_PORTS); static void ib_umad_add_one(struct ib_device *device); static void ib_umad_remove_one(struct ib_device *device);