From: Geert Uytterhoeven Date: Thu, 6 Nov 2025 13:34:14 +0000 (+0100) Subject: soc: renesas: Use bitfield helpers X-Git-Tag: v6.19-rc1~87^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c604cb5fdf0f569a9ce344a37a79958c3841396e;p=thirdparty%2Fkernel%2Flinux.git soc: renesas: Use bitfield helpers Use the field_get() helper, instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven Signed-off-by: Yury Norov (NVIDIA) --- diff --git a/drivers/soc/renesas/renesas-soc.c b/drivers/soc/renesas/renesas-soc.c index 1eb52356b996b..ee4f17bb4db45 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 */ +#include #include #include #include @@ -524,8 +525,7 @@ static int __init renesas_soc_init(void) eshi, eslo); } - if (soc->id && - ((product & id->mask) >> __ffs(id->mask)) != soc->id) { + if (soc->id && field_get(id->mask, product) != soc->id) { pr_warn("SoC mismatch (product = 0x%x)\n", product); ret = -ENODEV; goto free_soc_dev_attr;