lkml.org 
[lkml]   [2013]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2] RDMA/cma: silence GCC warning
Date
> Building cma.o triggers this GCC warning:
> drivers/infiniband/core/cma.c: In function ‘rdma_resolve_addr’:
> drivers/infiniband/core/cma.c:465:23: warning: ‘port’ may be used
> uninitialized in this function [-Wmaybe-uninitialized]
> drivers/infiniband/core/cma.c:426:5: note: ‘port’ was declared here
>
> This is a false positive, as "port" will always be initialized if we're
> at "found". But if we assign to "id_priv->id.port_num" directly, we can
> drop "port". That will, obviously, silence GCC.
>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>

Acked-by: Sean Hefty <sean.hefty@intel.com>

> ---
> 0) v2: assign to "id_priv->id.port_num" directly, instead of
> initializing "port" to 0, as discussed with Sean.
>
> 1) Still only compile tested.

tested - thanks
\
 
 \ /
  Last update: 2013-07-17 20:41    [W:0.116 / U:1.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site