Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

alpha: Define pgprot_modify to silence tautological comparison warnings

Alpha's pgprot_noncached, pgprot_writecombine, and pgprot_device are
all identity macros, so the generic pgprot_modify() produces
tautological self-comparisons that GCC warns about:

include/linux/pgtable.h:1701:25: warning: self-comparison always
evaluates to true [-Wtautological-compare]

Since all caching attributes are no-ops on Alpha, define
pgprot_modify() to simply return newprot.

Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
Link: https://lore.kernel.org/r/20260403150128.488513-1-mattst88@gmail.com
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>

authored by

Matt Turner and committed by
Magnus Lindholm
bd39fc81 55b22075

+11
+11
arch/alpha/include/asm/pgtable.h
··· 127 127 #define pgprot_noncached(prot) (prot) 128 128 129 129 /* 130 + * All caching attribute macros are identity on Alpha, so the generic 131 + * pgprot_modify() degenerates to tautological self-comparisons. 132 + * Override it to just return newprot directly. 133 + */ 134 + #define pgprot_modify pgprot_modify 135 + static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) 136 + { 137 + return newprot; 138 + } 139 + 140 + /* 130 141 * ZERO_PAGE is a global shared page that is always zero: used 131 142 * for zero-mapped memory areas etc.. 132 143 */