From: Mark Brown <broonie@kernel.org>
To: Janani Sunil <janani.sunil@analog.com>,
Yury Norov <ynorov@nvidia.com>,
Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: build failure after merge of the bitmap tree
Date: Wed, 23 Sep 2026 23:12:35 +0100 [thread overview]
Message-ID: <arRO00VFHgqajmoD@sirena.co.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 2144 bytes --]
Hi all,
After merging the iio tree, today's linux-next build (x86_64
allmodconfig) failed like this:
/tmp/next/build/drivers/iio/adc/ad7768.c:470:12: error: call to undeclared function 'be16_replace_bits'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
470 | st->d16 = be16_replace_bits(cpu_to_be16(AD7768_SPI_READ_CMD), reg,
| ^
due to commit
508bdb4938928 ("iio: adc: Add AD7768 and AD7768-4 core support")
interacting with
1c88ceb09d5e5 ("bitfield: get rid of __MAKE_OP machinery")
from the bitmap tree, that removed a bunch of function including
be16_replace_bits() which had no in kernel users but the new driver adds
a user. I have applied the fixup below (which I'll send a a proper
patch shortly) and can carry as required.
From 8eac82a4d67b29972540fdbf603768f222f870ea Mon Sep 17 00:00:00 2001
From: Mark Brown <broonie@kernel.org>
Date: Wed, 23 Sep 2026 22:49:22 +0100
Subject: [PATCH] bitfield: Restore be16_replace_bits()
Commit 1c88ceb09d5e5 ("bitfield: get rid of __MAKE_OP machinery")
removed a bunch of unused bitfield operations including
be16_replace_bits() but commit 508bdb4938928 ("iio: adc: Add AD7768 and
AD7768-4 core support") introduces a new user. Restore the function so
the build still works once both branches are merged.
Signed-off-by: Mark Brown <broonie@kernel.org>
---
include/linux/bitfield-fix-width.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/bitfield-fix-width.h b/include/linux/bitfield-fix-width.h
index fba86bb76999f..f73b8cd656010 100644
--- a/include/linux/bitfield-fix-width.h
+++ b/include/linux/bitfield-fix-width.h
@@ -93,6 +93,12 @@ u16 be16_get_bits(__be16 v, u16 field)
return (be16_to_cpu(v) & field) / field_multiplier(field);
}
+static __always_inline __must_check
+__be16 be16_replace_bits(__be16 old, u16 val, u16 field)
+{
+ return (old & ~cpu_to_be16(field)) | be16_encode_bits(val, field);
+}
+
static __always_inline __must_check
__u16 u16_encode_bits(u16 v, u16 field)
{
--
2.47.3
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2026-09-23 22:12 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 22:12 Mark Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-04-30 9:11 Thierry Reding
2026-03-24 15:11 Mark Brown
2026-03-24 17:56 ` Yury Norov
2025-11-25 7:24 Stephen Rothwell
2025-11-25 8:05 ` Geert Uytterhoeven
2025-11-25 8:31 ` Miquel Raynal
2025-11-25 8:37 ` Geert Uytterhoeven
2025-11-25 14:44 ` Yury Norov
2025-11-25 14:55 ` Miquel Raynal
2025-11-25 8:53 ` Miquel Raynal
2025-11-28 8:17 ` Miquel Raynal
2025-02-18 5:07 Stephen Rothwell
2025-02-18 10:35 ` Beata Michalska
2025-02-18 13:49 ` Stephen Rothwell
2025-02-18 14:10 ` Catalin Marinas
2025-02-18 14:16 ` Yury Norov
2025-02-18 18:23 ` Catalin Marinas
2025-02-18 19:28 ` Beata Michalska
2025-02-18 19:44 ` Catalin Marinas
2024-05-08 6:27 Stephen Rothwell
2024-05-08 13:24 ` Kuan-Wei Chiu
2024-05-08 22:18 ` Yury Norov
2023-10-20 4:49 Stephen Rothwell
2023-10-19 6:01 Stephen Rothwell
2023-10-19 15:58 ` Yury Norov
2023-10-20 4:24 ` Yury Norov
2023-10-20 4:51 ` Stephen Rothwell
2023-10-20 12:33 ` Yury Norov
2023-11-02 11:41 ` Alexander Lobakin
2022-09-26 23:53 broonie
2022-09-27 0:37 ` Yury Norov
2022-09-27 18:56 ` Mark Brown
2022-09-20 8:08 Stephen Rothwell
2022-09-20 14:49 ` Yury Norov
2022-07-27 10:29 Stephen Rothwell
2022-07-22 9:16 Stephen Rothwell
2022-07-22 19:29 ` Yury Norov
2022-07-15 10:29 Stephen Rothwell
2022-07-08 7:47 Stephen Rothwell
2022-05-02 8:15 Stephen Rothwell
2022-04-19 4:29 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=arRO00VFHgqajmoD@sirena.co.uk \
--to=broonie@kernel.org \
--cc=janani.sunil@analog.com \
--cc=jonathan.cameron@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=ynorov@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®