From nobody Fri Dec 19 06:07:40 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3F7313370F5; Thu, 6 Nov 2025 13:39:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762436342; cv=none; b=T+HzJRWRP05YxWdGixF8WM+Y1c3YJ0eZPchpar/NTv6ygcrGCESRB4UTq+RZxfS7cu05BJBgd7Z+MxNVj7eeNIqVl0oH/283gTIqHDZeyQeowe0MjOqkcMyhmztsJdcsZmpyExk1rGhFjODIq3nDCXgxia07YkvbSHmidTVSslw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762436342; c=relaxed/simple; bh=WYHa35/WSbF7l7X/7zby0sd49RpvAMPpddrSd2lq3dI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BzNntgnc82R8Vd2YIlNkvOFBfpckunkOhYjLoqOir9S6F42khi9qXRwBQJ1+Es59jx3mIaKGiTN1TcCN1J+ZPR/jgBZWJOR9GOBzEDpFly2BKsAlv+GG4opsH7cYfZBWVSbx6aSPZs43DVr2AaTWJNKBG1sovXKqw2KRtNyTkxk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC7F0C19422; Thu, 6 Nov 2025 13:38:51 +0000 (UTC) From: Geert Uytterhoeven To: Yury Norov , Michael Turquette , Stephen Boyd , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Giovanni Cabiddu , Herbert Xu , David Miller , Linus Walleij , Bartosz Golaszewski , Joel Stanley , Andrew Jeffery , Crt Mori , Jonathan Cameron , Lars-Peter Clausen , Jacky Huang , Shan-Chun Hung , Rasmus Villemoes , Jaroslav Kysela , Takashi Iwai , Johannes Berg , Jakub Kicinski , Alex Elder , David Laight , Vincent Mailhol , Jason Baron , Borislav Petkov , Tony Luck , Michael Hennerich , Kim Seer Paller , David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko , Richard Genoud , Cosmin Tanislav , Biju Das , Jianping Shen , Nathan Chancellor , Nick Desaulniers , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-crypto@vger.kernel.org, linux-edac@vger.kernel.org, qat-linux@intel.com, linux-gpio@vger.kernel.org, linux-aspeed@lists.ozlabs.org, linux-iio@vger.kernel.org, linux-sound@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v6 26/26] soc: renesas: Use bitfield helpers Date: Thu, 6 Nov 2025 14:34:14 +0100 Message-ID: <4316b09f7e7a4fa2ac0c5d05c3dbb25547969833.1762435376.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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" Use the field_get() helper, instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven --- v6: - No changes, v5: - No changes, v4: - No changes, v3: - No changes, v2: - Drop RFC, as a dependency was applied. --- drivers/soc/renesas/renesas-soc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/renesas/renesas-soc.c b/drivers/soc/renesas/renesa= s-soc.c index 1eb52356b996bdd7..ee4f17bb4db45db7 100644 --- a/drivers/soc/renesas/renesas-soc.c +++ b/drivers/soc/renesas/renesas-soc.c @@ -5,6 +5,7 @@ * Copyright (C) 2014-2016 Glider bvba */ =20 +#include #include #include #include @@ -524,8 +525,7 @@ static int __init renesas_soc_init(void) eshi, eslo); } =20 - if (soc->id && - ((product & id->mask) >> __ffs(id->mask)) !=3D soc->id) { + if (soc->id && field_get(id->mask, product) !=3D soc->id) { pr_warn("SoC mismatch (product =3D 0x%x)\n", product); ret =3D -ENODEV; goto free_soc_dev_attr; --=20 2.43.0