Thread (3 messages) flat view 3 messages, 3 authors, 2016-12-14

Re: [PATCH] IB/mlx4: avoid a -Wmaybe-uninitialize warning

From: Doug Ledford <hidden>
Date: 2016-12-14 17:14:02
Also in: linux-rdma, lkml

On 10/25/2016 12:16 PM, Arnd Bergmann wrote:
There is an old warning about mlx4_SW2HW_EQ_wrapper on x86:

ethernet/mellanox/mlx4/resource_tracker.c: In function ‘mlx4_SW2HW_EQ_wrapper’:
ethernet/mellanox/mlx4/resource_tracker.c:3071:10: error: ‘eq’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

The problem here is that gcc won't track the state of the variable
across a spin_unlock. Moving the assignment out of the lock is
safe here and avoids the warning.

Signed-off-by: Arnd Bergmann <redacted>
Thanks, applied.

-- 
Doug Ledford [off-list ref]
    GPG Key ID: 0E572FDD

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help