From: Jonathan Cameron <jic23@kernel.org>
To: Gabriel Braga Lagrotaria <gabrielblo@ime.usp.br>
Cc: andy@kernel.org, dlechner@baylibre.com,
javier.carrasco.cruz@gmail.com, nuno.sa@analog.com,
ricardo.kojo@ime.usp.br, elliancarlos@gmail.com,
linux-iio@vger.kernel.org
Subject: Re: [PATCH v2 2/2] iio: light: veml6030: Generalize hw_init for veml6030 and veml6035
Date: Mon, 4 May 2026 17:35:39 +0100 [thread overview]
Message-ID: <20260504173539.6f13785f@jic23-huawei> (raw)
In-Reply-To: <20260502234348.131563-3-gabrielblo@ime.usp.br>
On Sat, 2 May 2026 20:41:04 -0300
Gabriel Braga Lagrotaria <gabrielblo@ime.usp.br> wrote:
> Modify veml6030_hw_init() function to deduplicate the setup logic
> for veml6030_hw_init() and veml6035_hw_init(), and remove
> veml6035_hw_init().
>
> Additionally, introduce struct veml6030_hw_init_config_desc to store and
> pass the custom configuration values specific to each device variation.
>
> Signed-off-by: Gabriel Braga Lagrotaria <gabrielblo@ime.usp.br>
> Co-developed-by: Ricardo H H Kojo <ricardo.kojo@ime.usp.br>
> Signed-off-by: Ricardo H H Kojo <ricardo.kojo@ime.usp.br>
> Co-developed-by: Ellian Carlos <elliancarlos@gmail.com>
> Signed-off-by: Ellian Carlos <elliancarlos@gmail.com>
Hi All,
A few additional comments from me.
> @@ -1074,9 +1051,11 @@ static int veml6035_hw_init(struct iio_dev *indio_dev, struct device *dev)
> return dev_err_probe(dev, ret,
> "can't clear als interrupt status\n");
>
> - return 0;
> + return ret;
Why? If we can get here with anything that isn't 0 then fair enough, but I can't
see any change to make that now the case. If we know it is zero then explicitly
returning that is good for readability.
> }
>
> +
> +
Please proofread your own patches for stuff like this. It's very
easy to introduce stray changes as you develop your code so only
way to catch them is too look at the end result before sending it out.
Jonathan
prev parent reply other threads:[~2026-05-04 16:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-02 23:41 [PATCH v2 0/2] iio: light: veml6030: Generalize hw_init and cleanup naming Gabriel Braga Lagrotaria
2026-05-02 23:41 ` [PATCH v2 1/2] iio: light: veml6030: Remove 'x' wildcard usages in file Gabriel Braga Lagrotaria
2026-05-03 9:23 ` Joshua Crofts
2026-05-02 23:41 ` [PATCH v2 2/2] iio: light: veml6030: Generalize hw_init for veml6030 and veml6035 Gabriel Braga Lagrotaria
2026-05-03 0:02 ` Maxwell Doose
2026-05-04 14:14 ` Andy Shevchenko
2026-05-04 16:28 ` Jonathan Cameron
2026-05-04 16:35 ` Jonathan Cameron [this message]
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=20260504173539.6f13785f@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=elliancarlos@gmail.com \
--cc=gabrielblo@ime.usp.br \
--cc=javier.carrasco.cruz@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=ricardo.kojo@ime.usp.br \
/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