[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <08d551df-555f-4cde-b73b-0f2593c84823@lunn.ch>
Date: Sun, 24 Aug 2025 17:26:04 +0200
From: Andrew Lunn <andrew@...n.ch>
To: David Yang <mmyangfl@...il.com>
Cc: netdev@...r.kernel.org, Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Simon Horman <horms@...nel.org>,
Russell King <linux@...linux.org.uk>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v6 3/3] net: dsa: yt921x: Add support for
Motorcomm YT921x
> +#define yt921x_port_is_internal(port) ((port) < 8)
> +#define yt921x_port_is_external(port) (8 <= (port) && (port) < 9)
> +#define yt921x_info_port_is_internal(info, port) \
> + ((info)->internal_mask & BIT(port))
> +#define yt921x_info_port_is_external(info, port) \
> + ((info)->external_mask & BIT(port))
Do we really need two sets of macros?
And is there a third state? Can a port be not internal and not
external?
Maybe the code can just use !yt921x_info_port_is_internal(info, port)
Andrew
Powered by blists - more mailing lists