public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Hauke Mehrtens <hauke@hauke-m.de>,
	Woojung Huh <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Colin Foster <colin.foster@in-advantage.com>,
	Michael Hennerich <michael.hennerich@analog.com>,
	Alexander Aring <alex.aring@gmail.com>,
	Stefan Schmidt <stefan@datenfreihafen.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-wpan@vger.kernel.org
Subject: Re: [PATCH 01/12] net: dsa: lantiq_gswip: mark OF related data as maybe unused
Date: Sun, 12 Mar 2023 12:57:29 +0200	[thread overview]
Message-ID: <20230312105729.bnxn4a6mf2gav7ym@skbuf> (raw)
In-Reply-To: <d9b197c8-56fe-b59d-5fca-bc863ac1e7ed@linaro.org>

On Sun, Mar 12, 2023 at 11:20:38AM +0100, Krzysztof Kozlowski wrote:
> On 11/03/2023 19:14, Vladimir Oltean wrote:
> > On Sat, Mar 11, 2023 at 06:32:52PM +0100, Krzysztof Kozlowski wrote:
> >> The driver can be compile tested with !CONFIG_OF making certain data
> >> unused:
> >>
> >>   drivers/net/dsa/lantiq_gswip.c:1888:34: error: ‘xway_gphy_match’ defined but not used [-Werror=unused-const-variable=]
> >>
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >> ---
> > 
> > Do you happen to have any context as to why of_match_node() without
> > CONFIG_OF is implemented as:
> > 
> > #define of_match_node(_matches, _node)	NULL
> > 
> > and not as:
> > 
> > static inline const struct of_device_id *
> > of_match_node(const struct of_device_id *matches,
> > 	      const struct device_node *node)
> > {
> > 	return NULL;
> > }
> > 
> > ?
> > 
> > Generally, the static inline shim function model is nicer, because it
> > allows us to not scatter __maybe_unused all around.
> 
> Sorry, I don't follow. I don't touch that wrappers, just fix errors
> related to OF device ID tables, although in few cases it is indeed
> related to of_match_node.

I'm saying this because in lantiq_gswip.c, xway_gphy_match is accessed
through of_match_node(). If the shim definition for of_match_node() was
different, the variable wouldn't have been unused with CONFIG_OF=n.
I guess it's worth considering changing that wrapper instead of adding
the __maybe_unused.

  reply	other threads:[~2023-03-12 10:57 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-11 17:32 [PATCH 01/12] net: dsa: lantiq_gswip: mark OF related data as maybe unused Krzysztof Kozlowski
2023-03-11 17:32 ` [PATCH 02/12] net: dsa: lan9303: drop of_match_ptr for ID table Krzysztof Kozlowski
2023-03-11 17:32 ` [PATCH 03/12] net: dsa: seville_vsc9953: " Krzysztof Kozlowski
2023-03-11 17:32 ` [PATCH 04/12] net: dsa: ksz9477: " Krzysztof Kozlowski
2023-03-11 17:32 ` [PATCH 05/12] net: dsa: ocelot: " Krzysztof Kozlowski
2023-03-14 15:34   ` Colin Foster
2023-03-11 17:32 ` [PATCH 06/12] net: phy: ks8995: " Krzysztof Kozlowski
2023-03-11 17:32 ` [PATCH 07/12] net: ieee802154: adf7242: " Krzysztof Kozlowski
2023-03-12 11:31   ` Hennerich, Michael
2023-03-28 10:48   ` Miquel Raynal
2023-03-28 16:13     ` Stefan Schmidt
2023-03-11 17:32 ` [PATCH 08/12] net: ieee802154: mcr20a: " Krzysztof Kozlowski
2023-03-14  7:52   ` Stefan Schmidt
2023-03-11 17:33 ` [PATCH 09/12] net: ieee802154: at86rf230: " Krzysztof Kozlowski
2023-03-14  7:52   ` Stefan Schmidt
2023-03-11 17:33 ` [PATCH 10/12] net: ieee802154: ca8210: " Krzysztof Kozlowski
2023-03-14  7:53   ` Stefan Schmidt
2023-03-11 17:33 ` [PATCH 11/12] net: ieee802154: adf7242: drop owner from driver Krzysztof Kozlowski
2023-03-12 11:30   ` Hennerich, Michael
2023-03-28 10:49   ` Miquel Raynal
2023-03-11 17:33 ` [PATCH 12/12] net: ieee802154: ca8210: " Krzysztof Kozlowski
2023-03-14  7:53   ` Stefan Schmidt
2023-03-11 18:14 ` [PATCH 01/12] net: dsa: lantiq_gswip: mark OF related data as maybe unused Vladimir Oltean
2023-03-12 10:20   ` Krzysztof Kozlowski
2023-03-12 10:57     ` Vladimir Oltean [this message]
2023-03-15  5:22       ` Jakub Kicinski
2023-03-16  8:21         ` Krzysztof Kozlowski
2023-03-15  8:20 ` patchwork-bot+netdevbpf
2023-03-15 19:51   ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230312105729.bnxn4a6mf2gav7ym@skbuf \
    --to=olteanv@gmail.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alex.aring@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=colin.foster@in-advantage.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hauke@hauke-m.de \
    --cc=hkallweit1@gmail.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=michael.hennerich@analog.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stefan@datenfreihafen.org \
    --cc=woojung.huh@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox