From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Jonathan Cameron <jic23@kernel.org>,
linux-iio <linux-iio@vger.kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Subject: Re: [PATCH v1] iio: gyro: mpu3050: Use get_unaligned_leXX()
Date: Thu, 5 Nov 2020 17:07:06 +0200 [thread overview]
Message-ID: <20201105150706.GT4077@smile.fi.intel.com> (raw)
In-Reply-To: <CACRpkdYG4Z6vaKp9woULPz0CKyTCr6ZocfvRm4gxw2JktStggg@mail.gmail.com>
On Thu, Nov 05, 2020 at 03:23:07PM +0100, Linus Walleij wrote:
> On Thu, Oct 29, 2020 at 6:10 PM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > On Thu, Oct 29, 2020 at 5:05 PM Jonathan Cameron <jic23@kernel.org> wrote:
> > >
> > > On Mon, 26 Oct 2020 19:53:40 +0200
> > > Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> > >
> > > > This makes the driver code slightly easier to read.
> > > >
> > > > Cc: Linus Walleij <linus.walleij@linaro.org>
> > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > >
> > > What you have is good, but could we do better?
> > >
> > > Why not use an __le64 to grab the whole thing, convert it to a local
> > > cpu endian u64 then use FIELD_GET or similar to pull out the right bits.
> > > Would be fairly self documenting as well which is always nice.
> > >
> > > Or am I missing something?
> >
> > My laziness. I shared this as a leftover from a big series of
> > converting a lot of drivers to get_unligned_.eXX(). If you consider
> > this is not good enough, just don't apply (no hard feelings :-) I will
> > drop it from my local branches.
>
> I would suggest to apply it anyways because the kernel will look
> better after than before this patch.
>
> Possibly Jonathan could just slip in a TODO comment for this?
Sorry, I have already dropped, but if you convince Jonathan to apply, I agree
on whatever you propose (TODO comment as I see). I think patchwork or lore
still keeps a track of this.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2020-11-05 15:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 17:53 [PATCH v1] iio: gyro: mpu3050: Use get_unaligned_leXX() Andy Shevchenko
2020-10-28 13:24 ` Linus Walleij
2020-10-29 15:04 ` Jonathan Cameron
2020-10-29 17:10 ` Andy Shevchenko
2020-11-05 14:23 ` Linus Walleij
2020-11-05 15:07 ` Andy Shevchenko [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=20201105150706.GT4077@smile.fi.intel.com \
--to=andy.shevchenko@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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.