[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8fd869a2-9e7b-bba7-5cf0-af1d078016b6@redhat.com>
Date: Wed, 14 Dec 2016 12:13:43 -0500
From: Doug Ledford <dledford@...hat.com>
To: Arnd Bergmann <arnd@...db.de>, Yishai Hadas <yishaih@...lanox.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Jack Morgenstein <jackm@....mellanox.co.il>,
Or Gerlitz <ogerlitz@...lanox.com>,
Eran Ben Elisha <eranbe@...lanox.com>,
Moshe Shemesh <moshe@...lanox.com>,
Christophe Jaillet <christophe.jaillet@...adoo.fr>,
Moni Shoua <monis@...lanox.com>, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] IB/mlx4: avoid a -Wmaybe-uninitialize warning
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 <arnd@...db.de>
Thanks, applied.
--
Doug Ledford <dledford@...hat.com>
GPG Key ID: 0E572FDD
Download attachment "signature.asc" of type "application/pgp-signature" (885 bytes)
Powered by blists - more mailing lists