From: Mark Brown <broonie@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: raffaele.tranfaglia@gmail.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Johan Hovold <johan@kernel.org>,
Jonathan Cameron <jic23@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
driver-core@lists.linux.dev
Subject: Re: [PATCH RFC] regmap: kunit: add tests for values wider than val_bits
Date: Wed, 18 Nov 2026 11:30:26 +0000 [thread overview]
Message-ID: <a93f6d11-22a2-42db-81d8-297240c9bd2d@sirena.org.uk> (raw)
In-Reply-To: <av1qOFxolvDhQTKs@ashevche-desk.local>
[-- Attachment #1: Type: text/plain, Size: 879 bytes --]
On Wed, Nov 18, 2026 at 11:04:56AM +0200, Andy Shevchenko wrote:
> On Tue, Nov 17, 2026 at 07:55:14AM +0000, Raffaele Tranfaglia via B4 Relay wrote:
> > +static void raw_write_wider_than_val_bits(struct kunit *test)
> > +{
> > + struct regmap *map;
> > + struct regmap_config config;
> > + struct regmap_ram_data *data;
> > + u16 *hw_buf;
> > + unsigned int rval;
> Reversed xmas tree order?
I simply do not care about this.
> > +
> > + /* The "hardware" should only have seen the low val_bits bits */
> > + if (config.val_format_endian == REGMAP_ENDIAN_BIG)
> > + KUNIT_EXPECT_EQ(test, 0xff0f,
> > + be16_to_cpu((__force __be16)hw_buf[0]));
> Do we really need those explicit castings? I think they are already inside
> the byteorder macros. Also we have be16_to_cpup() and le16_to_cpup() which
> might help.
If we do need the casts that probably indicates a problem.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2026-11-18 11:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 7:55 Raffaele Tranfaglia via B4 Relay
2026-11-18 9:04 ` Andy Shevchenko
2026-11-18 11:30 ` Mark Brown [this message]
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=a93f6d11-22a2-42db-81d8-297240c9bd2d@sirena.org.uk \
--to=broonie@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=johan@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=raffaele.tranfaglia@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 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®