From: sashiko-bot@kernel.org
To: "Fabrice Gasnier" <fabrice.gasnier@foss.st.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 05/14] iio: adc: stm32-adc: rework internal channels data
Date: Wed, 23 Sep 2026 15:51:14 +0000 [thread overview]
Message-ID: <20260923155115.20E4E1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260923-adc-stm32mp25-v1-v2-5-46bc019537c6@foss.st.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] iio: adc: unintended functional change in stm32 internal channel delays
--
commit 1797bf77d1751b7e9502bd851d9e50359e42d644
Author: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
iio: adc: stm32-adc: rework internal channels data
This commit reworks the internal channel data structures for STM32 ADCs by
using designated initializers mapped to explicit channel enumerations. This
removes zeroed data entries and the need for static assertions.
> diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c
> index ddf74c674da6f..ac60c31de7a5b 100644
> --- a/drivers/iio/adc/stm32-adc.c
> +++ b/drivers/iio/adc/stm32-adc.c
[ ... ]
> @@ -2737,8 +2730,11 @@ static const struct stm32_adc_cfg stm32h7_adc_cfg = {
> .vref_charac_mv = 3300,
> };
>
> -static const unsigned int stm32_adc_min_ts_mp1[] = { 100, 100, 100, 4300, 9800 };
> -static_assert(ARRAY_SIZE(stm32_adc_min_ts_mp1) == STM32_ADC_INT_CH_NB);
> +static const unsigned int stm32_adc_min_ts_mp1[STM32_ADC_INT_CH_NB] = {
> + [STM32_ADC_INT_CH_VDDCORE] = 100,
> + [STM32_ADC_INT_CH_VREFINT] = 4300,
> + [STM32_ADC_INT_CH_VBAT] = 9800
> +};
[Severity: Medium]
Does this unintentionally alter the minimum sampling times for the VDDCPU and
VDDQ_DDR channels? The commit message states "No functional change intended",
but the previous array initialized these values to 100, whereas omitting
them from the designated initializer will now implicitly set them to 0.
>
> static const struct stm32_adc_cfg stm32mp1_adc_cfg = {
> .regs = &stm32mp1_adc_regspec,
[ ... ]
> @@ -2760,8 +2756,13 @@ static const struct stm32_adc_cfg stm32mp1_adc_cfg = {
> .vref_charac_mv = 3300,
> };
>
> -static const unsigned int stm32_adc_min_ts_mp13[] = { 100, 0, 0, 4300, 9800 };
> -static_assert(ARRAY_SIZE(stm32_adc_min_ts_mp13) == STM32_ADC_INT_CH_NB);
> +static const unsigned int stm32_adc_min_ts_mp13[STM32_ADC_INT_CH_NB] = {
> + [STM32_ADC_INT_CH_VDDCORE] = 1000,
> + [STM32_ADC_INT_CH_VDDCPU] = 1000,
> + [STM32_ADC_INT_CH_VDDQ_DDR] = 1000,
> + [STM32_ADC_INT_CH_VREFINT] = 4300,
> + [STM32_ADC_INT_CH_VBAT] = 9800
> +};
[Severity: Medium]
Is the minimum sampling time increase for the VDD channels intended? The
previous array initialized VDDCORE to 100, and VDDCPU and VDDQ_DDR to 0.
The new designated initializer explicitly sets all three to 1000. This
seems to conflict with the note in the commit message that no functional
change is intended.
>
> static const struct stm32_adc_cfg stm32mp13_adc_cfg = {
> .regs = &stm32mp13_adc_regspec,
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260923-adc-stm32mp25-v1-v2-0-46bc019537c6@foss.st.com?part=5
next prev parent reply other threads:[~2026-09-23 15:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 15:39 [PATCH v2 00/14] iio: adc: stm32: add support for stm32mp23 and stm32mp25 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 01/14] dt-bindings: iio: adc: stm32-adc: " Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 02/14] iio: adc: stm32-adc: core: manage clock prescaler diversity Fabrice Gasnier
2026-09-27 18:57 ` Jonathan Cameron
2026-09-23 15:39 ` [PATCH v2 03/14] iio: adc: stm32-adc: core: configurable number of interrupts Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 04/14] iio: adc: stm32-adc: manage characterization voltage diversity Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 05/14] iio: adc: stm32-adc: rework internal channels data Fabrice Gasnier
2026-09-23 15:51 ` sashiko-bot [this message]
2026-09-24 10:02 ` Fabrice Gasnier
2026-09-24 20:53 ` Andy Shevchenko
2026-09-23 15:39 ` [PATCH v2 06/14] iio: adc: stm32-adc: add vreg enable option to manage diversity Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 07/14] iio: adc: stm32-adc: add support for stm32mp25 Fabrice Gasnier
2026-09-23 16:14 ` sashiko-bot
2026-09-24 21:01 ` Andy Shevchenko
2026-09-29 16:48 ` Fabrice Gasnier
2026-09-30 8:33 ` Andy Shevchenko
2026-09-30 8:44 ` Fabrice Gasnier
2026-09-30 8:55 ` Andy Shevchenko
2026-09-23 15:39 ` [PATCH v2 08/14] iio: adc: stm32-adc: add support for stm32mp23 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 09/14] iio: adc: stm32: add support for vddgpu on stm32mp23 and stm32mp25 Fabrice Gasnier
2026-09-27 19:03 ` Jonathan Cameron
2026-09-23 15:39 ` [PATCH v2 10/14] arm64: dts: st: add vrefint calibration on stm32mp23 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 11/14] arm64: dts: st: add vrefint calibration on stm32mp25 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 12/14] arm64: dts: st: add ADC nodes on stm32mp231 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 13/14] arm64: dts: st: add ADC nodes on stm32mp251 Fabrice Gasnier
2026-09-23 15:39 ` [PATCH v2 14/14] arm64: dts: st: add ADC support on stm32mp257f-ev1 board Fabrice Gasnier
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=20260923155115.20E4E1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fabrice.gasnier@foss.st.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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