From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Joshua Crofts <joshua.crofts1@gmail.com>
Cc: Rishab Madhugiri <rishab.madhugiri@gmail.com>,
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] iio: core: Avoid BUG() on invalid clock types
Date: Mon, 24 Aug 2026 17:48:11 +0300 [thread overview]
Message-ID: <aoxZq7sc4ndMG-V8@ashevche-desk.local> (raw)
In-Reply-To: <20260824120503.00003500@gmail.com>
On Mon, Aug 24, 2026 at 12:05:03PM +0200, Joshua Crofts wrote:
> On Mon, 24 Aug 2026 12:55:47 +0300
> Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
>
> > On Sun, Aug 23, 2026 at 10:25:02PM +0000, Rishab Madhugiri wrote:
> > > Replace deprecated use of BUG() in default switch cases of
> > > iio_get_time_ns() and current_timestamp_clock_show() with
> > > WARN_ONCE() and return correct fallback or error codes.
> >
> > Why?!
>
> Because BUG() and BUG_ON() shouldn't be used anymore, no? Linus himself
> said that he hates the macros.
Why? Please, study the case. As for the above change, there are two questions
(at least):
- Why BUG() is deprecated? Where is it stated?
- What will WARN*() gain us here? (Note some specific kernel command line
parameter that may convert WARN to BUG)
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-08-24 14:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-23 22:25 [PATCH] iio: core: Avoid BUG() on invalid clock types Rishab Madhugiri
2026-08-23 22:48 ` Jonathan Cameron
2026-08-24 9:55 ` Andy Shevchenko
2026-08-24 10:05 ` Joshua Crofts
2026-08-24 14:48 ` Andy Shevchenko [this message]
2026-08-24 15:06 ` Joshua Crofts
2026-08-24 15:25 ` Andy Shevchenko
2026-08-25 23:48 ` Rishab M
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=aoxZq7sc4ndMG-V8@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=joshua.crofts1@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.