Subject: Re: [PATCH net-next 8/8] net: stmmac: report PCS configuration changes

From: "Russell King (Oracle)" <[email-masked]>
Date: Fri, 13 Mar 2026 18:42:16 +0000

On Fri, Mar 13, 2026 at 12:29:31PM +0000, Russell King (Oracle) wrote:
> +#define REPORT_BIT(x) \
> +		if (diff & GMAC_AN_CTRL_##x) \
> +			pr_warn("dwmac: %8s %u -> %u\n", #x, \
> +				!!(old & GMAC_AN_CTRL_##x), \
> +				!!(value & GMAC_AN_CTRL_##x))
> +		REPORT_BIT(ANE);
> +		REPORT_BIT(SGMRAL);
> +#undef REPORT_BIT

I see checkpatch wants the if() inside the macro to be wrapped in a
do-while loop, which is overkill for this - this is not a macro that
is used throughout the kernel, it's only used in the next two lines
where we can plainly see that this is safe. There is no need to make
this unnecessarily more complex - and thus less readable.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!