[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZB2OG4zZXsqqyN8v@smile.fi.intel.com>
Date: Fri, 24 Mar 2023 13:48:43 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: William Breathitt Gray <william.gray@...aro.org>
Cc: linux-iio@...r.kernel.org, Johannes Berg <johannes.berg@...el.com>,
Jonathan Cameron <jic23@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] counter: 104-quad-8: Refactor to buffer states
for CMR, IOR, and IDR
On Thu, Mar 23, 2023 at 05:25:28PM -0400, William Breathitt Gray wrote:
> The 104-quad-8 driver buffers the device configuration states
> separately, however each device has only three control registers: CMR,
> IOR, and IDR. Refactoring to buffer the states of these control
> registers rather than each configuration separately results in succinct
> code that more closely matches what is happening on the device.
...
> +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.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists