From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Rishab Madhugiri <rishab.madhugiri@gmail.com>
Cc: jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
andy@kernel.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: core: Replace BUG() with WARN_ON_ONCE() and error return
Date: Thu, 27 Aug 2026 09:41:12 +0300 [thread overview]
Message-ID: <ao_cCHTp9kKfOV-U@ashevche-desk.local> (raw)
In-Reply-To: <20260826213140.37437-1-rishab.madhugiri@gmail.com>
On Wed, Aug 26, 2026 at 09:31:40PM +0000, Rishab Madhugiri wrote:
> As documented in Documentation/process/deprecated.rst, the
> use of BUG() and BUG_ON() should be avoided as they could
> cause a complete system crash, preventing further debugging.
Right, but deprecation doesn't mean the _old_ existing code must be immediately
changed. I leave it to Jonathan, but I see no value in this change except
the unneeded churn. If we ever want to drop BUG(), it should be done tree wide.
Hence no tag given.
> In iio_get_time_ns() and current_timestamp_clock_show(), the
> clock type is already validated against supported clock
> types prior to these calls, making the default switch
> branches expected to be unreachable. Replace these with
> WARN_ON_ONCE(1) followed by an error return to avoid a
> crash and to log the highly unexpected condition.
There is like 10+ character space on each line, the commit message shouldn't
be that condensed.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-08-27 6:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 21:31 Rishab Madhugiri
2026-08-27 6:41 ` Andy Shevchenko [this message]
2026-08-27 22:24 ` Rishab M
2026-08-30 23:35 ` Jonathan Cameron
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=ao_cCHTp9kKfOV-U@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=rishab.madhugiri@gmail.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®