public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Sa, Nuno" <Nuno.Sa@analog.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH v1 2/2] iio: temperature: ltc2983: Make use of device properties
Date: Mon, 7 Feb 2022 11:24:20 +0200	[thread overview]
Message-ID: <YgDlRFmiys/Djgdx@smile.fi.intel.com> (raw)
In-Reply-To: <PH0PR03MB6786C5F8E528249EBA938070992B9@PH0PR03MB6786.namprd03.prod.outlook.com>

On Sun, Feb 06, 2022 at 12:51:00PM +0000, Sa, Nuno wrote:
> > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Sent: Saturday, February 5, 2022 7:24 PM
> > On Sat, Feb 05, 2022 at 05:14:54PM +0000, Jonathan Cameron wrote:
> > > On Thu,  3 Feb 2022 13:45:06 +0200
> > > Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

...

> > > > +#include <asm/byteorder.h>
> > > > +#include <asm/unaligned.h>
> > 
> > > This may well be a valid addition but it's not called out in the patch
> > > description.
> > 
> > This is a side effect of the change. Below I will try to explain, tell me if
> > that is what you want to be added to the commit message (feel free to
> > correct
> > my English).
> > 
> > The conversion slightly changes the logic behind property reading for
> > the
> > configuration values. Original code allocates just as much memory as
> > needed.
> > Then for each separate 32- or 64-bit value it reads it from the property
> > and converts to a raw one which will be fed to the sensor. In the new
> > code
> > we allocated the amount of memory needed to retrieve all values at
> > once from
> > the property and then convert them as required.
> 
> Yeah, I understood what you are doing... We allocate some extra bytes so
> that we can simplify a lot the logic to get, convert and put back the properties
> in the table... And since we are only writing the __real__ table size into the device
> I'm fairly positive this works. However, I do agree with Jonathan and I would
> be more confident to give this a test before being applied...
> 
> That said, I'm off till the end of the month (just doing minor stuff like replying
> to emails :)), so if we can hold this one, I will test it first thing I'm back in the
> office.

Will wait for your testing. Meanwhile I address all other comments and send v3
for further review.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2022-02-07  9:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 11:45 [PATCH v1 1/2] iio: temperature: ltc2983: Don't hard code defined constants in messages Andy Shevchenko
2022-02-03 11:45 ` [PATCH v1 2/2] iio: temperature: ltc2983: Make use of device properties Andy Shevchenko
2022-02-05 17:14   ` Jonathan Cameron
2022-02-05 17:15     ` Jonathan Cameron
2022-02-05 18:23     ` Andy Shevchenko
2022-02-06 12:51       ` Sa, Nuno
2022-02-07  9:24         ` Andy Shevchenko [this message]
2022-02-06 15:25       ` Jonathan Cameron
2022-02-06 12:52 ` [PATCH v1 1/2] iio: temperature: ltc2983: Don't hard code defined constants in messages Sa, Nuno

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=YgDlRFmiys/Djgdx@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Nuno.Sa@analog.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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