[PATCH v3] net: stmmac: compare p->des0 and p->des1 with __le32 type values

Jakub Kicinski kuba at kernel.org
Fri May 19 15:27:15 PDT 2023


On Fri, 19 May 2023 19:50:28 +0800 Min-Hua Chen wrote:
> -		if ((p->des0 == 0xffffffff) && (p->des1 == 0xffffffff))
> +		if (p->des0 == cpu_to_le32(0xffffffff) &&
> +		    p->des1 == cpu_to_le32(0xffffffff))

Can you try to fix the sparse tool instead? I believe it already
ignores such errors for the constant of 0, maybe it can be taught 
to ignore all "isomorphic" values?

By "isomorphic" I mean that 0xffffffff == cpu_to_le32(0xffffffff)
so there's no point complaining.
-- 
pw-bot: reject



More information about the linux-arm-kernel mailing list