From nobody Fri Dec 19 06:04:09 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 20A933328FB; Thu, 6 Nov 2025 13:36:16 +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=1762436176; cv=none; b=UwykNBCU1T9+ntCzg9gynnYaMflFMNsv546ZoCiy72XoGQtfpkcLK7SDoshOgjGsVGu/H8eXp9OcA0tmxeSz7DQl93N/HKfR7PIIPRMcxeLhqgi0wMrn//5ap/u7A+BE3yx3HmDzM72pLTkbKnYWgWSjXEncuSuMtqDd/Y9e26c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762436176; c=relaxed/simple; bh=NVO8rjAKtS1X+XIlE/vArk6VKL6+WzY8w6gLXSLIiQA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Wmtmp6woT6KJ+2twWWkxUwo4JSezhUObXU/NoDLMWAl3t9iPIU+LFvGHv2pYU11ibzI0tPUuuTRSbclX7bucIFJdlaQzHDksgjCZoo5DmISLvoNvF8b63u1p1e7C8HxU9aXDlqH0c27uZX+457gl2jlgJ07q7mAfQkK6ZPKoByA= 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 1E416C116C6; Thu, 6 Nov 2025 13:36:05 +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 -next v6 10/26] iio: imu: smi330: #undef field_{get,prep}() before definition Date: Thu, 6 Nov 2025 14:33:58 +0100 Message-ID: <54c739d05673e512d091bf78e54cd00e3655d7d4.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" Prepare for the advent of globally available common field_get() and field_prep() macros by undefining the symbols before defining local variants. This prevents redefinition warnings from the C preprocessor when introducing the common macros later. Suggested-by: Yury Norov Signed-off-by: Geert Uytterhoeven --- v6: - No changes, v5: - New. --- drivers/iio/imu/smi330/smi330_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/imu/smi330/smi330_core.c b/drivers/iio/imu/smi330/= smi330_core.c index d9178725ade3da83..a79964fe68fadf47 100644 --- a/drivers/iio/imu/smi330/smi330_core.c +++ b/drivers/iio/imu/smi330/smi330_core.c @@ -68,7 +68,9 @@ #define SMI330_SOFT_RESET_DELAY 2000 =20 /* Non-constant mask variant of FIELD_GET() and FIELD_PREP() */ +#undef field_get #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1)) +#undef field_prep #define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask)) =20 #define SMI330_ACCEL_CHANNEL(_axis) { \ --=20 2.43.0