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@xxxxxxxxx> wrote: > > On Thu, Oct 29, 2020 at 5:05 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote: > > > > > > On Mon, 26 Oct 2020 19:53:40 +0200 > > > Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > > > > > > > This makes the driver code slightly easier to read. > > > > > > > > Cc: Linus Walleij <linus.walleij@xxxxxxxxxx> > > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > > > > > > 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