From nobody Sun Feb 8 13:09:06 2026 Received: from mailtransmit05.runbox.com (mailtransmit05.runbox.com [185.226.149.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4C634A1394 for ; Wed, 21 Jan 2026 14:58:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.226.149.38 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769007490; cv=none; b=hUDXlLn5DPWXtiOGlvEt3oMtgYPGaKwsM15XHgJGag+wuF6yvtsWrskwlyGZf81rYdKwN9T0lromKCEFB1FD4Rrcn6SUIIDNIgcioac4SImcvdRPjVpBH00DggYw2a0fWXeAbzv2zcN5vVjTIL0JQJrcimdh7+PHIi2szCD3aZc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769007490; c=relaxed/simple; bh=WLWZVpeZhx+DAeWbAnRY6lcMK6WxhnXbv31m9woOk6g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=e/DnqM5DArL0VpbrL5FB+zVbucEIDjW4SJmFHHkylkxwG0AEo0dZBK5u1PUIKdoiuFnYLmgR45W/oxSYXj2uf6s/ErWeIkFOrMVnxyowW7bfj24DqDdwJo/urwZB6++uLzGzBg7iBEVHocRzan4nRdHTfBMwDKeB/68qjd0Dq5I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=runbox.com; dkim=pass (2048-bit key) header.d=runbox.com header.i=@runbox.com header.b=vr0CBPMR; arc=none smtp.client-ip=185.226.149.38 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=runbox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=runbox.com header.i=@runbox.com header.b="vr0CBPMR" Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1viZen-008Pi9-QK; Wed, 21 Jan 2026 15:58:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector2; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To :Message-Id:Date:Subject:Cc:To:From; bh=cF43fDD/g1BgXHMaIGGBWzL2e37s8+SbQXJh1FJtOkY=; b=vr0CBPMRBRE+lctEWWosrDIQZG z3juNwE4hOINU5wiKjyzCNEMuKgO09OkDRks9znM75u5Ne7WXSFdoPzwIuQlwVhV6jkAsdPvxslTg gTgWnzPznfOW0OlPzmhiTK69V0hki0sI873zqRx+H2RrQY88brR14ATnQuo2GLEH2odmKsOiwUPZq 39O9HEEPdo+SRgnCkA1PvvV7GbShnjFOjWY5eEmFlueEXWCGAYsJH/EpgdqSABBXJHQRbdw2vu7QA tTlFEfNva1z7tEvGneXL9RmhW+nAlmeoPantOXbe+Fo1HYO4dvRwh8JIsCXf7kEWNwrJn+ORg8MXL bLelEwsA==; Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1viZen-0006qK-BQ; Wed, 21 Jan 2026 15:58:05 +0100 Received: by submission01.runbox with esmtpsa [Authenticated ID (1493616)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) id 1viZeW-00GH6h-Rn; Wed, 21 Jan 2026 15:57:48 +0100 From: david.laight.linux@gmail.com To: Nathan Chancellor , Greg Kroah-Hartman , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Mathieu Desnoyers , Arnd Bergmann , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Yury Norov , Lucas De Marchi , Jani Nikula , Vincent Mailhol , Andy Shevchenko , Kees Cook , Andrew Morton Cc: David Laight Subject: [PATCH next 08/14] bits: simplify GENMASK_TYPE() Date: Wed, 21 Jan 2026 14:57:25 +0000 Message-Id: <20260121145731.3623-9-david.laight.linux@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260121145731.3623-1-david.laight.linux@gmail.com> References: <20260121145731.3623-1-david.laight.linux@gmail.com> 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" From: David Laight Since the type is always unsigned (T)-1 is always the correct value so there is no need to use type_max(). Signed-off-by: David Laight --- include/linux/bits.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/linux/bits.h b/include/linux/bits.h index a40cc861b3a7..697318f2a47d 100644 --- a/include/linux/bits.h +++ b/include/linux/bits.h @@ -45,8 +45,7 @@ */ #define GENMASK_TYPE(t, h, l) \ ((t)(GENMASK_INPUT_CHECK(h, l) + \ - (type_max(t) << (l) & \ - type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h))))) + ((t)-1 << (l) & (t)-1 >> (BITS_PER_TYPE(t) - 1 - (h))))) =20 #define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l) #define GENMASK_ULL(h, l) GENMASK_TYPE(unsigned long long, h, l) --=20 2.39.5