* [PATCH net v5] net: pcs: rzn1-miic: Fix config array initialization
@ 2026-09-15 17:39 Kyle Hendry via B4 Relay
2026-09-15 20:03 ` Lad, Prabhakar
2026-09-18 0:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Kyle Hendry via B4 Relay @ 2026-09-15 17:39 UTC (permalink / raw)
To: Clément Léger, Andrew Lunn, Heiner Kallweit,
Russell King, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni
Cc: Lad Prabhakar, linux-renesas-soc, netdev, linux-kernel,
Geert Uytterhoeven, Kyle Hendry
From: Kyle Hendry <khendry@reliablecontrols.com>
Fix memset parameters to initialize the entire DT value array
Fixes: f39e968dc168a7bd ("net: pcs: rzn1-miic: Move configuration data to SoC-specific struct")
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Kyle Hendry <khendry@reliablecontrols.com>
---
Fix issues when populating dt_val array from device tree values
Changes in v5:
* Target memset patch for net
* Drop port number validation patch for later submission to net-next
Changes in v4: https://lore.kernel.org/r/20260914-rzn1-miic-fix-array-v4-0-069112feec86@reliablecontrols.com
* Fix lines longer than 80 char
* Add of_node_put() before returning
Changes in v3: https://lore.kernel.org/r/20260902-rzn1-miic-fix-array-v3-0-3f7dccffaf5a@reliablecontrols.com
* Make invalid port number return error
* Update commit tags
Changes in v2: https://lore.kernel.org/r/20260901-rzn1-miic-fix-array-v2-0-3e907049e770@reliablecontrols.com
* Use a more correct array size in memset
* Ensure that write to dt_val is in range
Link to v1: https://lore.kernel.org/r/20260813-rzn1-miic-fix-array-v1-1-b58cafcc917e@reliablecontrols.com
---
drivers/net/pcs/pcs-rzn1-miic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/pcs/pcs-rzn1-miic.c b/drivers/net/pcs/pcs-rzn1-miic.c
index 2b72fa98ddf1..cb74861e823c 100644
--- a/drivers/net/pcs/pcs-rzn1-miic.c
+++ b/drivers/net/pcs/pcs-rzn1-miic.c
@@ -683,7 +683,8 @@ static int miic_parse_dt(struct miic *miic, u32 *mode_cfg)
if (!dt_val)
return -ENOMEM;
- memset(dt_val, MIIC_MODCTRL_CONF_NONE, sizeof(*dt_val));
+ memset(dt_val, MIIC_MODCTRL_CONF_NONE,
+ sizeof(*dt_val) * miic->of_data->conf_conv_count);
if (of_property_read_u32(np, "renesas,miic-switch-portin", &conf) == 0)
dt_val[0] = conf;
---
base-commit: 83a945a529d6e002dd7339c532288a931f463dba
change-id: 20260813-rzn1-miic-fix-array-e6ae4452c017
Best regards,
--
Kyle Hendry <khendry@reliablecontrols.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net v5] net: pcs: rzn1-miic: Fix config array initialization
2026-09-15 17:39 [PATCH net v5] net: pcs: rzn1-miic: Fix config array initialization Kyle Hendry via B4 Relay
@ 2026-09-15 20:03 ` Lad, Prabhakar
2026-09-18 0:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Lad, Prabhakar @ 2026-09-15 20:03 UTC (permalink / raw)
To: khendry
Cc: Clément Léger, Andrew Lunn, Heiner Kallweit,
Russell King, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Lad Prabhakar, linux-renesas-soc, netdev,
linux-kernel, Geert Uytterhoeven
On Tue, Sep 15, 2026 at 6:54 PM Kyle Hendry via B4 Relay
<devnull+khendry.reliablecontrols.com@kernel.org> wrote:
>
> From: Kyle Hendry <khendry@reliablecontrols.com>
>
> Fix memset parameters to initialize the entire DT value array
>
> Fixes: f39e968dc168a7bd ("net: pcs: rzn1-miic: Move configuration data to SoC-specific struct")
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Kyle Hendry <khendry@reliablecontrols.com>
> ---
> Fix issues when populating dt_val array from device tree values
>
> Changes in v5:
> * Target memset patch for net
> * Drop port number validation patch for later submission to net-next
>
> Changes in v4: https://lore.kernel.org/r/20260914-rzn1-miic-fix-array-v4-0-069112feec86@reliablecontrols.com
> * Fix lines longer than 80 char
> * Add of_node_put() before returning
>
> Changes in v3: https://lore.kernel.org/r/20260902-rzn1-miic-fix-array-v3-0-3f7dccffaf5a@reliablecontrols.com
> * Make invalid port number return error
> * Update commit tags
>
> Changes in v2: https://lore.kernel.org/r/20260901-rzn1-miic-fix-array-v2-0-3e907049e770@reliablecontrols.com
> * Use a more correct array size in memset
> * Ensure that write to dt_val is in range
>
> Link to v1: https://lore.kernel.org/r/20260813-rzn1-miic-fix-array-v1-1-b58cafcc917e@reliablecontrols.com
> ---
> drivers/net/pcs/pcs-rzn1-miic.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cheers,
Prabhakar
> diff --git a/drivers/net/pcs/pcs-rzn1-miic.c b/drivers/net/pcs/pcs-rzn1-miic.c
> index 2b72fa98ddf1..cb74861e823c 100644
> --- a/drivers/net/pcs/pcs-rzn1-miic.c
> +++ b/drivers/net/pcs/pcs-rzn1-miic.c
> @@ -683,7 +683,8 @@ static int miic_parse_dt(struct miic *miic, u32 *mode_cfg)
> if (!dt_val)
> return -ENOMEM;
>
> - memset(dt_val, MIIC_MODCTRL_CONF_NONE, sizeof(*dt_val));
> + memset(dt_val, MIIC_MODCTRL_CONF_NONE,
> + sizeof(*dt_val) * miic->of_data->conf_conv_count);
>
> if (of_property_read_u32(np, "renesas,miic-switch-portin", &conf) == 0)
> dt_val[0] = conf;
>
> ---
> base-commit: 83a945a529d6e002dd7339c532288a931f463dba
> change-id: 20260813-rzn1-miic-fix-array-e6ae4452c017
>
> Best regards,
> --
> Kyle Hendry <khendry@reliablecontrols.com>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net v5] net: pcs: rzn1-miic: Fix config array initialization
2026-09-15 17:39 [PATCH net v5] net: pcs: rzn1-miic: Fix config array initialization Kyle Hendry via B4 Relay
2026-09-15 20:03 ` Lad, Prabhakar
@ 2026-09-18 0:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-09-18 0:10 UTC (permalink / raw)
To: Kyle Hendry
Cc: clement.leger, andrew, hkallweit1, linux, davem, edumazet, kuba,
pabeni, prabhakar.mahadev-lad.rj, linux-renesas-soc, netdev,
linux-kernel, geert+renesas
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 15 Sep 2026 10:39:20 -0700 you wrote:
> From: Kyle Hendry <khendry@reliablecontrols.com>
>
> Fix memset parameters to initialize the entire DT value array
>
> Fixes: f39e968dc168a7bd ("net: pcs: rzn1-miic: Move configuration data to SoC-specific struct")
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Kyle Hendry <khendry@reliablecontrols.com>
>
> [...]
Here is the summary with links:
- [net,v5] net: pcs: rzn1-miic: Fix config array initialization
https://git.kernel.org/netdev/net/c/daf677c2c644
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-18 0:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15 17:39 [PATCH net v5] net: pcs: rzn1-miic: Fix config array initialization Kyle Hendry via B4 Relay
2026-09-15 20:03 ` Lad, Prabhakar
2026-09-18 0:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®