From: David Lechner <dlechner@baylibre.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
Josh Poimboeuf <jpoimboe@kernel.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
"Arnd Bergmann" <arnd@arndb.de>,
"Peter Zijlstra" <peterz@infradead.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>
Subject: Re: [PATCH 3/3] iio: imu: bmi160: Remove potential undefined behavior in bmi160_config_pin()
Date: Mon, 9 Mar 2026 11:52:21 -0500 [thread overview]
Message-ID: <d5bc6fb4-fbe0-4cd2-8caf-2021f7490fa9@baylibre.com> (raw)
In-Reply-To: <CAHp75Ve_4dHfx0unbLdOOOdP-A=qBuZZkC4G9u+h8jgFq6WcTw@mail.gmail.com>
On 3/9/26 11:40 AM, Andy Shevchenko wrote:
> On Mon, Mar 9, 2026 at 6:03 PM Josh Poimboeuf <jpoimboe@kernel.org> wrote:
>>
>> If 'pin' is not one of its expected values, the value of
>> 'int_out_ctrl_shift' is undefined. With UBSAN enabled, this causes
>> Clang to generate undefined behavior, resulting in the following
>> warning:
>>
>> drivers/iio/imu/bmi160/bmi160_core.o: warning: objtool: bmi160_setup_irq() falls through to next function __cfi_bmi160_core_runtime_resume()
>>
>> Prevent the UB and improve error handling by adding a BUG() if 'pin' has
>> an unexpected value.
>
>> Cc: Jonathan Cameron <jic23@kernel.org>
>> Cc: David Lechner <dlechner@baylibre.com>
>> CC: Nuno Sá <nuno.sa@analog.com>
>> Cc: Andy Shevchenko <andy@kernel.org>
>
> Please, reduce the noise in the commit message by moving Cc list to be
> below the '---' line. This will have the same effect on email (Git
> tools work fine) and if anybody needs this information it will be
> preserved in lore.kernel.org archive. In case you have questions about
> handling this locally, there is a subthread (patch 18) of this series:
> https://lore.kernel.org/lkml/20260123113708.416727-19-bigeasy@linutronix.de/
>
And be sure to include the IIO mailing list too, not just the maintainers/
reviewers. Omitting it breaks some workflows.
next prev parent reply other threads:[~2026-03-09 16:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 16:03 [PATCH 0/3] some objtool warnings fixes Josh Poimboeuf
2026-03-09 16:03 ` [PATCH 1/3] objtool: Fix Clang jump table detection Josh Poimboeuf
2026-03-18 8:25 ` [tip: objtool/urgent] " tip-bot2 for Josh Poimboeuf
2026-03-09 16:03 ` [PATCH 2/3] ASoC: codecs: wcd9335: Remove potential undefined behavior in wcd9335_slimbus_irq() Josh Poimboeuf
2026-03-09 16:05 ` Mark Brown
2026-03-09 16:13 ` Josh Poimboeuf
2026-03-09 17:45 ` Srinivas Kandagatla
2026-03-09 16:03 ` [PATCH 3/3] iio: imu: bmi160: Remove potential undefined behavior in bmi160_config_pin() Josh Poimboeuf
2026-03-09 16:16 ` Nuno Sá
2026-03-09 16:27 ` Josh Poimboeuf
2026-03-09 16:31 ` Nuno Sá
2026-03-09 16:48 ` Josh Poimboeuf
2026-03-09 16:40 ` Andy Shevchenko
2026-03-09 16:52 ` David Lechner [this message]
2026-03-09 16:55 ` Josh Poimboeuf
2026-03-09 22:36 ` (subset) [PATCH 0/3] some objtool warnings fixes Mark Brown
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=d5bc6fb4-fbe0-4cd2-8caf-2021f7490fa9@baylibre.com \
--to=dlechner@baylibre.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=arnd@arndb.de \
--cc=jic23@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nuno.sa@analog.com \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/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®