All of lore.kernel.org
 help / color / mirror / Atom feed
* infiniband build warning
@ 2013-07-22  1:37 Michel Lespinasse
       [not found] ` <20130722013758.GA14337-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Michel Lespinasse @ 2013-07-22  1:37 UTC (permalink / raw)
  To: Sean Hefty, LKML

Hi,

I am seeing build warnings in drivers/infiniband/core/cma.c starting with v3.11-rc1. These can be reproduced with gcc 4.6.3.

Would you consider applying the following fix ?
(The compiler warning seems benign as I could easily convince myself that the variable won't be used uninitialized, but I'd like to get rid of the compiler warning anyway).

--------------------------------- 8< ------------------------------------
infiniband: fix maybe-uninitialized warning in rdma_resolve_addr()

This fixes the following warning:

drivers/infiniband/core/cma.c: In function 'rdma_resolve_addr':
drivers/infiniband/core/cma.c:465:23: error: 'port' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/infiniband/core/cma.c:426:5: note: 'port' was declared here

The warning looks benign: port is only used after checking that
cma_dev is not NULL, and all assignments to cma_dev also set port.

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index f1c279fabe64..7b2e38ad1243 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -423,7 +423,7 @@ static int cma_resolve_ib_dev(struct rdma_id_private *id_priv)
 	struct sockaddr_ib *addr;
 	union ib_gid gid, sgid, *dgid;
 	u16 pkey, index;
-	u8 port, p;
+	u8 port = 0, p;
 	int i;
 
 	cma_dev = NULL;

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: infiniband build warning
  2013-07-22  1:37 infiniband build warning Michel Lespinasse
@ 2013-07-22  5:40     ` Hefty, Sean
  0 siblings, 0 replies; 4+ messages in thread
From: Hefty, Sean @ 2013-07-22  5:40 UTC (permalink / raw)
  To: Michel Lespinasse, LKML
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)

> I am seeing build warnings in drivers/infiniband/core/cma.c starting with
> v3.11-rc1. These can be reproduced with gcc 4.6.3.
> 
> Would you consider applying the following fix ?

A patch to fix this was submitted to the linux-rdma list last week.	  Thanks.

- Sean
--
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] 4+ messages in thread

* RE: infiniband build warning
@ 2013-07-22  5:40     ` Hefty, Sean
  0 siblings, 0 replies; 4+ messages in thread
From: Hefty, Sean @ 2013-07-22  5:40 UTC (permalink / raw)
  To: Michel Lespinasse, LKML; +Cc: linux-rdma (linux-rdma@vger.kernel.org)

> I am seeing build warnings in drivers/infiniband/core/cma.c starting with
> v3.11-rc1. These can be reproduced with gcc 4.6.3.
> 
> Would you consider applying the following fix ?

A patch to fix this was submitted to the linux-rdma list last week.	  Thanks.

- Sean

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: infiniband build warning
  2013-07-22  5:40     ` Hefty, Sean
  (?)
@ 2013-07-23 18:40     ` Or Gerlitz
  -1 siblings, 0 replies; 4+ messages in thread
From: Or Gerlitz @ 2013-07-23 18:40 UTC (permalink / raw)
  To: Roland Dreier
  Cc: Michel Lespinasse, LKML, linux-rdma (linux-rdma@vger.kernel.org),
	Hefty, Sean

On Mon, Jul 22, 2013 at 8:40 AM, Hefty, Sean <sean.hefty@intel.com> wrote:
>> I am seeing build warnings in drivers/infiniband/core/cma.c starting with
>> v3.11-rc1. These can be reproduced with gcc 4.6.3.
>> Would you consider applying the following fix ?

> A patch to fix this was submitted to the linux-rdma list last week.

Hi Roland,

There is a nice set of patches (IPoIB virtualization fixes, mlx5
fixes, iser patches to cope with Connect-IB no FMR, etc, etc) posted
to linux-rdma little before && after 3.11-rc1 was out, and we are @
rc2 now. I think we need to get them upstreamed around this time such
that its early enough in the cycle, makes sense?

Or.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-23 18:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-22  1:37 infiniband build warning Michel Lespinasse
     [not found] ` <20130722013758.GA14337-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-07-22  5:40   ` Hefty, Sean
2013-07-22  5:40     ` Hefty, Sean
2013-07-23 18:40     ` Or Gerlitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.