Re: [PATCH] mdio: use inline functions for to_mdio_device() etc

2020-10-28 Thread Jakub Kicinski
On Mon, 26 Oct 2020 17:51:09 +0100 Arnd Bergmann wrote: > From: Arnd Bergmann > > Nesting container_of() causes warnings with W=2, and doing this > in a header means we see a lot of them, like: > > In file included from drivers/net/mdio/of_mdio.c:11: > drivers/net/mdio/of_mdio.c: In function 'of

Re: [PATCH] mdio: use inline functions for to_mdio_device() etc

2020-10-28 Thread Arnd Bergmann
On Wed, Oct 28, 2020 at 2:16 AM Jakub Kicinski wrote: > On Mon, 26 Oct 2020 17:51:09 +0100 Arnd Bergmann wrote: > > > Fixes: a9049e0c513c ("mdio: Add support for mdio drivers.") > > I feel like this is slightly onerous, please drop the tag. > > Harmless W=2 warnings hardly call for getting this i

Re: [PATCH] mdio: use inline functions for to_mdio_device() etc

2020-10-26 Thread Andrew Lunn
On Mon, Oct 26, 2020 at 05:51:09PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann .. > Redefine the macros in linux/mdio.h as inline functions to avoid this > problem. > > Fixes: a9049e0c513c ("mdio: Add support for mdio drivers.") > Signed-off-by: Arnd Bergmann Hi Arnd It is nice to have

[PATCH] mdio: use inline functions for to_mdio_device() etc

2020-10-26 Thread Arnd Bergmann
From: Arnd Bergmann Nesting container_of() causes warnings with W=2, and doing this in a header means we see a lot of them, like: In file included from drivers/net/mdio/of_mdio.c:11: drivers/net/mdio/of_mdio.c: In function 'of_phy_find_device': include/linux/kernel.h:852:8: warning: declaration