All of lore.kernel.org
 help / color / mirror / Atom feed
From: Esben Haabendal <esben@geanix.com>
To: "Andy Shevchenko" <andriy.shevchenko@intel.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Nikita Travkin" <nikita@trvn.ru>,
	"Maslov Dmitry" <maslovdmitry@seeed.cc>,
	"Kuppuswamy Sathyanarayanan"
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 6/6] iio: light: ltr501: Fix sorting order of device arrays
Date: Mon, 10 Aug 2026 08:12:51 +0200	[thread overview]
Message-ID: <87a4quy04c.fsf@geanix.com> (raw)
In-Reply-To: <anePwmLumk4k8l9e@ashevche-desk.local> (Andy Shevchenko's message of "Sat, 08 Aug 2026 23:21:22 +0300")

"Andy Shevchenko" <andriy.shevchenko@intel.com> writes:

> On Fri, Aug 07, 2026 at 09:57:17AM +0200, Esben Haabendal wrote:
>> "Andy Shevchenko" <andriy.shevchenko@intel.com> writes:
>> > On Tue, Aug 04, 2026 at 07:02:17PM +0200, Esben Haabendal wrote:
>
> ...
>
>> >>  enum {
>> >> -	ltr501 = 0,
>> >> -	ltr559,
>> >> -	ltr301,
>> >
>> >> +	ltr301 = 0,
>> >
>> > Is the 0 required? Why?
>>
>> As for the code produced, it should not make any difference.
>>
>> I assume it was put here for improved code readability, and I did not
>> see any reason to change that.
>>
>> I don't care about it myself, so will be happy to remove it if that is
>> the preferred style now.
>
> It's not about the style, it's about understanding the C language.
> As per style, we have only one requirement in IIO, if the value is used
> in communication with HW (part of protocol or a bitfield) *all* enum
> values must be explicitly assigned, otherwise (Linux only case) none
> (with, of course some exceptions, which are not the case here).

Ok. I will amend the patch with this change, so that we get rid of this
unneeded and unwanted assignment.

>> >>  	ltr303,
>> >>  	ltr329,
>> >> +	ltr501,
>> >> +	ltr559,
>> >>  };

/Esben

  reply	other threads:[~2026-08-10  6:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 17:02 [PATCH v3 0/6] iio: light: ltr501: Add ltr329 support Esben Haabendal
2026-08-04 17:02 ` [PATCH v3 1/6] dt-bindings: iio: light: ltr501: Sort compatible enum array Esben Haabendal
2026-08-05  7:14   ` Krzysztof Kozlowski
2026-08-04 17:02 ` [PATCH v3 2/6] dt-bindings: iio: light: ltr501: Add missing ltr303 compatible Esben Haabendal
2026-08-05  7:14   ` Krzysztof Kozlowski
2026-08-04 17:02 ` [PATCH v3 3/6] dt-bindings: iio: light: ltr501: Add ltr329 compatible Esben Haabendal
2026-08-04 17:16   ` sashiko-bot
2026-08-05  7:15   ` Krzysztof Kozlowski
2026-08-04 17:02 ` [PATCH v3 4/6] iio: light: ltr501: Power down chip if request irq fails Esben Haabendal
2026-08-04 17:36   ` sashiko-bot
2026-08-06 21:37   ` Andy Shevchenko
2026-08-07  7:32     ` Esben Haabendal
2026-08-04 17:02 ` [PATCH v3 5/6] iio: light: ltr501: Add ltr329 driver support Esben Haabendal
2026-08-04 17:59   ` sashiko-bot
2026-08-06 21:39   ` Andy Shevchenko
2026-08-07  7:53     ` Esben Haabendal
2026-08-08 20:19       ` Andy Shevchenko
2026-08-10  6:17         ` Esben Haabendal
2026-08-04 17:02 ` [PATCH v3 6/6] iio: light: ltr501: Fix sorting order of device arrays Esben Haabendal
2026-08-06 21:39   ` Andy Shevchenko
2026-08-07  7:57     ` Esben Haabendal
2026-08-08 20:21       ` Andy Shevchenko
2026-08-10  6:12         ` Esben Haabendal [this message]
2026-08-05 17:15 ` [PATCH v3 0/6] iio: light: ltr501: Add ltr329 support Kuppuswamy Sathyanarayanan

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=87a4quy04c.fsf@geanix.com \
    --to=esben@geanix.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maslovdmitry@seeed.cc \
    --cc=nikita@trvn.ru \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.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 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.