Linux IIO development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: William Breathitt Gray <william.gray@linaro.org>
Cc: linux-iio@vger.kernel.org,
	Johannes Berg <johannes.berg@intel.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] counter: 104-quad-8: Refactor to buffer states for CMR, IOR, and IDR
Date: Fri, 24 Mar 2023 15:48:19 +0200	[thread overview]
Message-ID: <ZB2qI7k/Igws5khg@smile.fi.intel.com> (raw)
In-Reply-To: <ZB2k9m7rL7Hpy/zU@fedora>

On Fri, Mar 24, 2023 at 09:26:14AM -0400, William Breathitt Gray wrote:
> On Fri, Mar 24, 2023 at 01:50:07PM +0200, Andy Shevchenko wrote:
> > On Fri, Mar 24, 2023 at 01:48:43PM +0200, Andy Shevchenko wrote:
> > > On Thu, Mar 23, 2023 at 05:25:28PM -0400, William Breathitt Gray wrote:

...

> > > > +static void quad8_control_register_update(struct quad8 *const priv, u8 *const buf,
> > > > +					  const size_t channel, const u8 val, const u8 field)
> > > > +{
> > > > +	u8p_replace_bits(&buf[channel], val, field);
> > > > +	iowrite8(buf[channel], &priv->reg->channel[channel].control);
> > > > +}
> > > 
> > > How did you compile this?
> > > Due to nature of *_replace_bits() this may only be a macro.
> > > 
> > > That's what LKP is telling about I think.
> > 
> > Ah, no, that's because the last parameter is not constant in the last patch in
> > the series.

> I'm having trouble cross-compiling for riscv, but I'm unable to recreate
> the build error when I compile for x86_64. However, I'd like to
> understand this error so I can fix it properly.
> 
> Is the problem here due to the "const u8 field" parameter? Instead of a
> constant variable, does this need to be a constant literal value for
> u8p_replace_bits()? I don't think that parameter changed in the last
> patch of the series, so why is the build error occurring for the last
> patch and not this penultimate patch here?

Good question. Perhaps my understanding is incorrect.

> Would qualifying the
> quad8_control_register_update() function with "__always_inline" resolve
> this issue?

Hmm... Don't know. You can always download a toolchain specifically build for
building kernels: https://mirrors.edge.kernel.org/pub/tools/crosstool/.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-03-24 13:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23 21:25 [PATCH v2 0/3] Refactor 104-quad-8 to match device operations William Breathitt Gray
2023-03-23 21:25 ` [PATCH v2 1/3] counter: 104-quad-8: Utilize bitfield access macros William Breathitt Gray
2023-03-23 21:25 ` [PATCH v2 2/3] counter: 104-quad-8: Refactor to buffer states for CMR, IOR, and IDR William Breathitt Gray
2023-03-24 11:48   ` Andy Shevchenko
2023-03-24 11:50     ` Andy Shevchenko
2023-03-24 13:26       ` William Breathitt Gray
2023-03-24 13:48         ` Andy Shevchenko [this message]
2023-03-24 15:35           ` William Breathitt Gray
2023-03-27  0:01             ` William Breathitt Gray
2023-03-27  9:55               ` Andy Shevchenko
2023-03-31 18:24                 ` William Breathitt Gray
2023-03-23 21:25 ` [PATCH v2 3/3] counter: 104-quad-8: Utilize helper functions to handle PR, FLAG and PSC William Breathitt Gray
2023-03-24  3:46   ` 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=ZB2qI7k/Igws5khg@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=jic23@kernel.org \
    --cc=johannes.berg@intel.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=william.gray@linaro.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