[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210802080205.6a9f9bb1@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Mon, 2 Aug 2021 08:02:05 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>,
Lars Povlsen <lars.povlsen@...rochip.com>,
Steen Hegelund <Steen.Hegelund@...rochip.com>,
UNGLinuxDriver@...rochip.com,
Bjarni Jonasson <bjarni.jonasson@...rochip.com>,
Arnd Bergmann <arnd@...db.de>, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: sparx5: fix bitmask check
On Mon, 2 Aug 2021 16:54:37 +0200 Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> Older compilers such as gcc-5.5 produce a warning in this driver
> when ifh_encode_bitfield() is not getting inlined:
>
> drivers/net/ethernet/microchip/sparx5/sparx5_netdev.c: In function 'ifh_encode_bitfield':
> include/linux/compiler_types.h:333:38: error: call to '__compiletime_assert_545' declared with attribute error: Unsupported width, must be <= 40
> drivers/net/ethernet/microchip/sparx5/sparx5_netdev.c:28:2: note: in expansion of macro 'compiletime_assert'
> compiletime_assert(width <= 40, "Unsupported width, must be <= 40");
> ^
>
> Mark the function as __always_inline to make the check work correctly
> on all compilers.
I fixed this by moving the check out to a macro wrapper in net:
6387f65e2acb ("net: sparx5: fix compiletime_assert for GCC 4.9")
> To make this also work on 32-bit architectures, change
> the GENMASK() to GENMASK_ULL().
Would you mind resending just that part against net/master?
> Fixes: f3cad2611a77 ("net: sparx5: add hostmode with phylink support")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Powered by blists - more mailing lists