From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] resource: add WARN_ON_ONCE for resource_size() and document misusage
Date: Tue, 9 Dec 2025 17:40:54 +0200 [thread overview]
Message-ID: <aThDBuWTGfAwO4C_@smile.fi.intel.com> (raw)
In-Reply-To: <69383bc9.050a0220.3cbaa0.7757@mx.google.com>
On Tue, Dec 09, 2025 at 04:09:57PM +0100, Christian Marangi wrote:
> On Tue, Dec 09, 2025 at 05:07:09PM +0200, Andy Shevchenko wrote:
> > On Tue, Dec 09, 2025 at 12:25:38PM +0200, Ilpo Järvinen wrote:
> > > On Mon, 8 Dec 2025, Christian Marangi wrote:
...
> > > > static inline resource_size_t resource_size(const struct resource *res)
> > > > {
> > > > + WARN_ON_ONCE(!res->flags);
> > >
> > > As lkp also found out, you need to add #include <linux/bug.h>
> >
> > Since it's header, we may use better one from asm, i.e. asm/bug.h.
> > This will give finer granularity and less possible tangled dependencies
> > in the future.
> >
>
> Will change in v3 I assume minor touch up to wording might be needed so
> it's not a problem.
Ah, I just commented on v2, yeah, please give at least 24h between versions of
the patch.
> > > > return res->end - res->start + 1;
> > > > }
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-12-09 15:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 20:29 [PATCH] resource: add WARN_ON_ONCE for resource_size() and document misusage Christian Marangi
2025-12-09 9:54 ` kernel test robot
2025-12-09 10:25 ` Ilpo Järvinen
2025-12-09 15:07 ` Andy Shevchenko
2025-12-09 15:09 ` Christian Marangi
2025-12-09 15:40 ` Andy Shevchenko [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-12-09 12:08 kernel test robot
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=aThDBuWTGfAwO4C_@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=ansuelsmth@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.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 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.