From: "Javier Carrasco" <javier.carrasco.cruz@gmail.com>
To: "Andy Shevchenko" <andriy.shevchenko@intel.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Rishi Gupta" <gupt21@gmail.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Matti Vaittinen" <mazziesaccount@gmail.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/4] iio: light: veml6030: fix channel type when pushing events
Date: Thu, 14 May 2026 09:44:00 +1300 [thread overview]
Message-ID: <DIHUBAWF7RQ4.205UNZAU31THF@gmail.com> (raw)
In-Reply-To: <agTY71MPPJ1b7qLC@ashevche-desk.local>
On Thu May 14, 2026 at 9:02 AM +13, Andy Shevchenko wrote:
> On Thu, May 14, 2026 at 07:13:41AM +1300, Javier Carrasco wrote:
>> On Thu May 14, 2026 at 6:48 AM +13, Andy Shevchenko wrote:
>> > On Wed, May 13, 2026 at 05:49:42PM +1300, Javier Carrasco wrote:
>> >> The events are registered for IIO_LIGHT and not for IIO_INTENSITY.
>> >> Use the correct channel type.
>> >
>> >> This bug was introduced in the first version of the driver.
>> >
>> > Unneeded detail, if it's a bug, use Fixes tag.
>>
>> >> When at it, fix minor checkpatch code style warning (alignment).
>
> ...
>
>> >> - iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(IIO_INTENSITY,
>> >> - 0, IIO_EV_TYPE_THRESH, evtdir),
>> >> - iio_get_time_ns(indio_dev));
>> >> + iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(IIO_LIGHT,
>> >> + 0,
>> >> + IIO_EV_TYPE_THRESH,
>> >> + evtdir),
>> >> + iio_get_time_ns(indio_dev));
>> >
>> > AFAICS the indentation is still broken. Why not doing like this:
>> >
>> > iio_push_event(indio_dev,
>> > IIO_UNMOD_EVENT_CODE(IIO_LIGHT, 0, IIO_EV_TYPE_THRESH, evtdir),
>> > iio_get_time_ns(indio_dev));
>>
>> Thank you for your feedback. According to checkpatch.pl, both variants
>> are fine. Mine takes into account the indentation within
>> IIO_UNMOD_EVENT_CODE(),
>
> And still have broken indentation with the last parameter. So it's not fine.
>
I am sorry to insist on this, but I beg to differ. The last paramter
(iio_get_time_ns()) is properly aligned as an argument of
iio_push_event() and not IIO_UNMOD_EVENT_CODE(). That is exactly my
point: with my indentation it is clear that iio_get_time_ns() is an
argument of iio_push_event() and not IIO_UNMOD_EVENT_CODE() because of
the alignment. Moreove, my proposed alignment (which again, is fine with
checkpatch --strict and the original one for example wasn't) is
consistent with many usages of iio_push_event() in existing drivers. I
just checked that there are dozens like mine, being the majority when it
comes to this kind of indentation.
>> and yours only accounts for the indentation for
>> the arguments of iio_push_event(). Moreover, your suggestion goes beyond
>> 80 characters and mine does not,
>
> When it's about readability the 80 characters is not a strict limit.
>
>> so I would prefer sticking to mine if
>> possible.
>
> I recommend to reconsider. Mine has no indentation issues, the only subtle
> "problem" is 86 character line. And looking at the result I find mine better
> to read (hence the exception may apply and we are fine with the length of
> the line).
>
>> As I said, it passes checkpatch --strict without warnings
>> in both cases.
>
>> I will send a new version adding the Fixes tag and removing the comment.
>
> Make it the first patch as the currently first one does not sound like a fix
> to me.
Ok, I will make this one the first patch of a smaller series with the
right Fixes tag added to it and removed from the other patch that
affects veml6030. I will split the new driver in smaller chunks and send
it as a dedicated series but continuing with the current versioning.
Best regards,
Javier
next prev parent reply other threads:[~2026-05-13 20:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 4:49 [PATCH v2 0/4] iio: light: add support for veml6031x00 ALS series Javier Carrasco
2026-05-13 4:49 ` [PATCH v2 1/4] iio: light: veml6030: remove unnecessary read of IT index Javier Carrasco
2026-05-13 16:59 ` Andy Shevchenko
2026-05-13 18:17 ` Javier Carrasco
2026-05-13 19:58 ` Andy Shevchenko
2026-05-14 7:54 ` sashiko-bot
2026-05-13 4:49 ` [PATCH v2 2/4] iio: light: veml6030: fix channel type when pushing events Javier Carrasco
2026-05-13 17:48 ` Andy Shevchenko
2026-05-13 18:13 ` Javier Carrasco
2026-05-13 20:02 ` Andy Shevchenko
2026-05-13 20:44 ` Javier Carrasco [this message]
2026-05-13 20:56 ` Andy Shevchenko
2026-05-14 8:08 ` sashiko-bot
2026-05-13 4:49 ` [PATCH v2 3/4] dt-bindings: iio: light: veml6030: add veml6031x00 ALS series Javier Carrasco
2026-05-13 4:49 ` [PATCH v2 4/4] iio: light: add support for " Javier Carrasco
[not found] ` <690B63AD-4429-4045-B413-29911ED7DA3D@gmail.com>
2026-05-13 16:36 ` Andy Shevchenko
2026-05-13 16:37 ` Andy Shevchenko
2026-05-13 16:56 ` Andy Shevchenko
2026-05-13 18:23 ` Javier Carrasco
2026-05-13 20:08 ` Andy Shevchenko
2026-05-14 9:29 ` sashiko-bot
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=DIHUBAWF7RQ4.205UNZAU31THF@gmail.com \
--to=javier.carrasco.cruz@gmail.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=gupt21@gmail.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mazziesaccount@gmail.com \
--cc=nuno.sa@analog.com \
--cc=robh@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.