netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: mscc: ocelot: fix build error due to missing IEEE_8021QAZ_MAX_TCS
@ 2022-03-15 13:12 Vladimir Oltean
  2022-03-15 19:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Oltean @ 2022-03-15 13:12 UTC (permalink / raw)
  To: netdev
  Cc: Jakub Kicinski, David S. Miller, Florian Fainelli, Andrew Lunn,
	Vivien Didelot, Vladimir Oltean, Claudiu Manoil,
	Alexandre Belloni, UNGLinuxDriver

IEEE_8021QAZ_MAX_TCS is defined in include/uapi/linux/dcbnl.h, which is
included by net/dcbnl.h. Then, linux/netdevice.h conditionally includes
net/dcbnl.h if CONFIG_DCB is enabled.

Therefore, when CONFIG_DCB is disabled, this indirect dependency is
broken.

There isn't a good reason to include net/dcbnl.h headers into the ocelot
switch library which exports low-level hardware API, so replace
IEEE_8021QAZ_MAX_TCS with OCELOT_NUM_TC which has the same value.

Fixes: 978777d0fb06 ("net: dsa: felix: configure default-prio and dscp priorities")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/ethernet/mscc/ocelot.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 41dbb1e326c4..a26d613088ef 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -2917,7 +2917,7 @@ EXPORT_SYMBOL_GPL(ocelot_port_get_default_prio);
 
 int ocelot_port_set_default_prio(struct ocelot *ocelot, int port, u8 prio)
 {
-	if (prio >= IEEE_8021QAZ_MAX_TCS)
+	if (prio >= OCELOT_NUM_TC)
 		return -ERANGE;
 
 	ocelot_rmw_gix(ocelot,
@@ -2959,7 +2959,7 @@ int ocelot_port_add_dscp_prio(struct ocelot *ocelot, int port, u8 dscp, u8 prio)
 {
 	int mask, val;
 
-	if (prio >= IEEE_8021QAZ_MAX_TCS)
+	if (prio >= OCELOT_NUM_TC)
 		return -ERANGE;
 
 	/* There is at least one app table priority (this one), so we need to
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: mscc: ocelot: fix build error due to missing IEEE_8021QAZ_MAX_TCS
  2022-03-15 13:12 [PATCH net-next] net: mscc: ocelot: fix build error due to missing IEEE_8021QAZ_MAX_TCS Vladimir Oltean
@ 2022-03-15 19:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-15 19:00 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: netdev, kuba, davem, f.fainelli, andrew, vivien.didelot, olteanv,
	claudiu.manoil, alexandre.belloni, UNGLinuxDriver

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 15 Mar 2022 15:12:15 +0200 you wrote:
> IEEE_8021QAZ_MAX_TCS is defined in include/uapi/linux/dcbnl.h, which is
> included by net/dcbnl.h. Then, linux/netdevice.h conditionally includes
> net/dcbnl.h if CONFIG_DCB is enabled.
> 
> Therefore, when CONFIG_DCB is disabled, this indirect dependency is
> broken.
> 
> [...]

Here is the summary with links:
  - [net-next] net: mscc: ocelot: fix build error due to missing IEEE_8021QAZ_MAX_TCS
    https://git.kernel.org/netdev/net-next/c/72f56fdb97b2

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-15 19:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-15 13:12 [PATCH net-next] net: mscc: ocelot: fix build error due to missing IEEE_8021QAZ_MAX_TCS Vladimir Oltean
2022-03-15 19:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).