All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Angel Iglesias <ang.iglesiasg@gmail.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH v2 1/3] iio: pressure: bmp280: Use uint8 to store chip ids
Date: Wed, 23 Aug 2023 19:17:30 +0300	[thread overview]
Message-ID: <ZOYxGhZxpTDUpURQ@smile.fi.intel.com> (raw)
In-Reply-To: <ZOYveUBg3rKK+ZQ9@smile.fi.intel.com>

On Wed, Aug 23, 2023 at 07:10:33PM +0300, Andy Shevchenko wrote:
> On Wed, Aug 23, 2023 at 05:58:05PM +0200, Angel Iglesias wrote:
> > Represent the device id reg values using uint8 to optimize memory use.
> 
> This doesn't correspond to the code, in the code you used uint8_t.

...

> >  struct bmp280_chip_info {
> >  	unsigned int id_reg;
> > -	const unsigned int chip_id;
> > +	uint8_t chip_id;
> 
> While this will compile and even work properly in kernel we use uXX types,
> here u8.

Actually this patch doesn't optimize memory use. The alignment will create
a gap anyway.

That said, this patch is simply redundant.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-08-23 16:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23 15:58 [PATCH v2 0/3] iio: pressure: bmp280: Add support for BMP390 Angel Iglesias
2023-08-23 15:58 ` [PATCH v2 1/3] iio: pressure: bmp280: Use uint8 to store chip ids Angel Iglesias
2023-08-23 16:10   ` Andy Shevchenko
2023-08-23 16:17     ` Andy Shevchenko [this message]
2023-08-25  9:28       ` Angel Iglesias
2023-08-23 15:58 ` [PATCH v2 2/3] iio: pressure: bmp280: Allow multiple chips id per family of devices Angel Iglesias
2023-08-23 16:26   ` Andy Shevchenko
2023-08-25  9:30     ` Angel Iglesias
2023-08-23 15:58 ` [PATCH v2 3/3] iio: pressure: bmp280: Add support for BMP390 Angel Iglesias
2023-08-23 16:27   ` Andy Shevchenko

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=ZOYxGhZxpTDUpURQ@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=ang.iglesiasg@gmail.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 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.