From nobody Tue Apr 7 12:20:31 2026 Received: from mail-yx1-f48.google.com (mail-yx1-f48.google.com [74.125.224.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B451F3CE482 for ; Fri, 3 Apr 2026 15:01:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775228495; cv=none; b=LhwkDdWQRZ6/rIhobptkuYy+1RsLz/8L1S+dw2fb9AmuY85mfelxon8YVDVpQxXnm+bnWOhw2VDNmW5eYFCJYaqbask3HgSnUGAryUM1PNHVBnMS3l362Pg+Pn7B+5lwO18X7/CdpYiwG5Y8IBj70n41SgLlCMVB6BSMDtp7ubE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775228495; c=relaxed/simple; bh=NdIF5sOQd2w289VpjmcpdlZpVPcTjPSemhqRhV875iw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LSDkPPqK9H9rqyOUDjI/f5RIxEPDD+yRsFq4nfv3fZn4bHc97FtW0up4HnnRZTq3OYMxP04pNZzBAoP4562zwPHqfeFFBfvmWlpuYwdThkt29Zu1oJPJC2FiBttR5byImip7ckmE7kIE0itcyWrAPLFr0NukDF4uoB8I6DTPyeU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TlJVw5bv; arc=none smtp.client-ip=74.125.224.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TlJVw5bv" Received: by mail-yx1-f48.google.com with SMTP id 956f58d0204a3-649278a69c5so1543222d50.3 for ; Fri, 03 Apr 2026 08:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775228493; x=1775833293; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+XLPnNG3eYVb7XrzDIAACab3asFeKq2Xkczz4joHxAU=; b=TlJVw5bvFPWWy/bd/fpjMkdHaWocQhNlRnjNdBDky1Mr1zvEDUq9qZVf0XQW8KSgJz rVapQC54mnBstrocgoKafiHO94xPerDQzkOuxYh9DFV/hXg5huJw1ZWlQ4W2F6mTBVIh VZaqf0Y5tNhLhlov3VTiVpRdAa+Vi6MvN9UNjULfjaAfi4aZgCPgOm/5R2JdEkzAVciL 2TZFW2TwgZ7rtcmcOu0WVPBDIRbHF2Q0uQvdcNDTUaLC12ELtW78RnPYNUihEo2S+8MW OxMeIx6KndL9DoOY7WyPK4+w8zBvUGSdVhwadwiUthhRmLVkwLMSjj3XQAIDC9jah0An K6Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775228493; x=1775833293; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+XLPnNG3eYVb7XrzDIAACab3asFeKq2Xkczz4joHxAU=; b=XOnk0MLr8w8K+6uZFlpTzWKVYXt6n/OiIj6TOJImtXTaZmgw9oodTzQ84AbLcromcU n4DKSYvUyjj/gz8H/reBavJRj99VfDhGQP8KKEXjXm7OfuY0SL6Wcs2vNOqTrAILaotT hHeINCIK1uw5vfwrcWsia3Ln+2BDx6qBDIyaH+P7ptIKbThKYKR2Foq6nStpEDq0a98y e2Bke0KZY85uB88RN8woImdcC4ekK9mE/JBobaUdypM7D/GJubr6NQhAvKwJh0cMVk30 cgdDBpl3Ra+bXO1mXMpxlQAOiidmjDb59vBL8JgbQS8D2YVvZsHQoC16k7FXkRkh9oT7 /Gvw== X-Forwarded-Encrypted: i=1; AJvYcCXQIyQ6on4ujUo+4RcQtdyoYgCqjtVIvP4vQb9yLbxh3zbxZmI2N3rkrcH7IaPgXtCyicTgb96tKFb5LNk=@vger.kernel.org X-Gm-Message-State: AOJu0YzgHrxy0Ta3DVUliAmblKRGaE6M7o5ONonS0smDkwgpdoUcK+Sd x+UDar6iEvGnPtq79jopm5AmR9lgYQNfzKZFigMD2Bncd12gArR8tJPs X-Gm-Gg: AeBDietCbDDob4YIraQZG1AwH/92+nRt0mFY5oumld5otjnalC6DJVNdGTUPAmwNP4P sJ/Xgn51YqfS4s+OvKU24r0gJVl+xZuoQdDSb/jRXrCvp4r1Bc7u5XMG788vb0jl4CksFMn9Ehn cfOCviXrBcTlZSk/3Bbpnx1dnEIhRhS+H1xZzsapQ7x+ztqyMvXCMi/SKp8ED7G/eZ8qXD6nP13 uMCfKU48xvaWCU4j00ORjND6CpkcZYupAwMs5f7oB1ckCvjDUaUV8WaZjO5omSLnKHAJ6V3vjS+ pWdEFxzM88QEs533MVhTeg1CeJ6KQrpL8CEtbbYzeiSuyz3lZ6j7UUvbeCVSW3xW/rdEz05NHXD htdIIRJcDpi7sKkNmA3reb3HZDoJIEc1mOHFXHDhIz36tQEE4QRUjB0KQP2KRFnEFzanjTDO2/4 svgNvpcZWQH9YC+emdLiY= X-Received: by 2002:a05:690e:1246:b0:64a:dbe3:fab7 with SMTP id 956f58d0204a3-650486859edmr2680389d50.8.1775228491799; Fri, 03 Apr 2026 08:01:31 -0700 (PDT) Received: from localhost ([76.195.202.134]) by smtp.gmail.com with UTF8SMTPSA id 956f58d0204a3-6503a97714fsm2498856d50.12.2026.04.03.08.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2026 08:01:31 -0700 (PDT) From: Matt Turner To: Magnus Lindholm Cc: linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, Matt Turner Subject: [PATCH] alpha: Define pgprot_modify to silence tautological comparison warnings Date: Fri, 3 Apr 2026 11:01:28 -0400 Message-ID: <20260403150128.488513-1-mattst88@gmail.com> X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- arch/alpha/include/asm/pgtable.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git ./arch/alpha/include/asm/pgtable.h ./arch/alpha/include/asm/pgta= ble.h index e786f630de5c..849abe2a1f98 100644 --- ./arch/alpha/include/asm/pgtable.h +++ ./arch/alpha/include/asm/pgtable.h @@ -126,6 +126,17 @@ struct vm_area_struct; */ #define pgprot_noncached(prot) (prot) =20 +/* + * All caching attribute macros are identity on Alpha, so the generic + * pgprot_modify() degenerates to tautological self-comparisons. + * Override it to just return newprot directly. + */ +#define pgprot_modify pgprot_modify +static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) +{ + return newprot; +} + /* * ZERO_PAGE is a global shared page that is always zero: used * for zero-mapped memory areas etc.. --=20 2.52.0