mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Marangi <ansuelsmth@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.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 16:09:57 +0100	[thread overview]
Message-ID: <69383bc9.050a0220.3cbaa0.7757@mx.google.com> (raw)
In-Reply-To: <aTg7HXlArkxOsgKs@smile.fi.intel.com>

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.

> > >  	return res->end - res->start + 1;
> > >  }
> 
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

-- 
	Ansuel

  reply	other threads:[~2025-12-09 15:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-08 20:29 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 [this message]
2025-12-09 15:40       ` Andy Shevchenko

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=69383bc9.050a0220.3cbaa0.7757@mx.google.com \
    --to=ansuelsmth@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.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 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®