From: sashiko-bot@kernel.org
To: "Mikhail Kshevetskiy" <mikhail.kshevetskiy@iopsys.eu>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v8 21/35] pinctrl: airoha: split driver on shared code and SoC specific drivers
Date: Mon, 27 Jul 2026 18:09:20 +0000 [thread overview]
Message-ID: <20260727180920.B9D2B1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260727174141.664933-22-mikhail.kshevetskiy@iopsys.eu>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Unnecessary dynamic duplication of the immutable airoha_gpio_irq_chip structure.
--
--- Patch [21]: [PATCH v8 21/35] pinctrl: airoha: split driver on shared code and SoC specific drivers ---
commit f869e493675daeefed57a5b2a9793621932f6025
Author: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
pinctrl: airoha: split driver on shared code and SoC specific drivers
This commit splits the combined an7581/an7583 source file into shared pinctrl
code and SoC-specific pinctrl drivers. The initialization code was also adapted
to work properly for shared and SoC-specific cases.
> diff --git a/drivers/pinctrl/airoha/airoha-common.h b/drivers/pinctrl/airoha/airoha-common.h
> index 721b2a53ab8a9..cfa6603aee33a 100644
> --- a/drivers/pinctrl/airoha/airoha-common.h
> +++ b/drivers/pinctrl/airoha/airoha-common.h
> @@ -128,9 +128,12 @@ struct airoha_pinctrl {
> struct regmap *regmap;
>
> struct airoha_pinctrl_gpiochip gpiochip;
> + struct irq_chip gpio_irq_chip;
> };
[ ... ]
> diff --git a/drivers/pinctrl/airoha/pinctrl-airoha.c b/drivers/pinctrl/airoha/pinctrl-airoha.c
> index c45b0637cf69b..34485cc29624c 100644
> --- a/drivers/pinctrl/airoha/pinctrl-airoha.c
> +++ b/drivers/pinctrl/airoha/pinctrl-airoha.c
> @@ -2601,6 +332,7 @@ static int airoha_pinctrl_add_gpiochip(struct airoha_pinctrl *pinctrl,
> struct platform_device *pdev)
> {
> struct airoha_pinctrl_gpiochip *chip = &pinctrl->gpiochip;
> + struct irq_chip *irq_chip = &pinctrl->gpio_irq_chip;
> struct gpio_chip *gc = &chip->chip;
> struct gpio_irq_chip *girq = &gc->irq;
> struct device *dev = &pdev->dev;
> @@ -2625,9 +357,11 @@ static int airoha_pinctrl_add_gpiochip(struct airoha_pinctrl *pinctrl,
> gc->base = -1;
> gc->ngpio = AIROHA_NUM_PINS;
>
> + memcpy(irq_chip, &airoha_gpio_irq_chip, sizeof(struct irq_chip));
[Severity: Low]
Is this memcpy() necessary? The gpiolib IRQCHIP_IMMUTABLE flag is designed
specifically to allow sharing a single const static struct irq_chip across
all instances without modification.
Dynamically duplicating the immutable airoha_gpio_irq_chip struct defeats
the purpose of the immutable API contract and uses more per-instance memory.
> +
> girq->default_type = IRQ_TYPE_NONE;
> girq->handler = handle_bad_irq;
> - gpio_irq_chip_set_chip(girq, &airoha_gpio_irq_chip);
> + gpio_irq_chip_set_chip(girq, irq_chip);
>
> irq = platform_get_irq(pdev, 0);
> if (irq < 0)
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260727174141.664933-1-mikhail.kshevetskiy@iopsys.eu?part=21
next prev parent reply other threads:[~2026-07-27 18:09 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 17:41 [PATCH v8 00/35] pinctrl: airoha: split on shared and SoC drivers, add more SoCs Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 01/35] dt-bindings: pinctrl: airoha: en7581: fix misprint in i2s function name Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 02/35] dt-bindings: pinctrl: airoha: en7581: fix pwm pin-groups Mikhail Kshevetskiy
2026-07-27 17:53 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 03/35] dt-bindings: pinctrl: airoha: an7583: fix device tree binding schema Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 04/35] pinctrl: airoha: fix mdio bitfield names Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 05/35] pinctrl: airoha: an7581: fix pinconf of i2c_scl/i2c_sda pins Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 06/35] pinctrl: airoha: an7583: fix I2C0_SDA_PD register bit order Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 07/35] pinctrl: airoha: an7583: there are no muxes to enable i2c buses Mikhail Kshevetskiy
2026-07-27 17:52 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 08/35] dt-bindings: pinctrl: airoha: an7583: remove i2c pin function Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 09/35] pinctrl: airoha: an7581: fix mux/conf of pcie_reset pins Mikhail Kshevetskiy
2026-07-27 17:55 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 10/35] dt-bindings: pinctrl: airoha: en7581: allow configuration of pcie_reset pins as gpio or pwm Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 11/35] pinctrl: airoha: an7583: fix muxing of non-gpio default pins Mikhail Kshevetskiy
2026-07-27 18:00 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 12/35] dt-bindings: pinctrl: airoha: an7583: allow configuration of non-gpio default pins as gpio and pwm Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 13/35] pinctrl: airoha: add missed get_direction() function for gpio_chip Mikhail Kshevetskiy
2026-07-27 18:04 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 14/35] pinctrl: airoha: add set_direction() helper " Mikhail Kshevetskiy
2026-07-27 18:09 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 15/35] pinctrl: airoha: fix getting gpiochip/pinctrl pointers in the IRQ handling code Mikhail Kshevetskiy
2026-07-27 17:56 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 16/35] pinctrl: airoha: fix IRQ mask/unmask code Mikhail Kshevetskiy
2026-07-27 18:15 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 17/35] pinctrl: airoha: add missed IRQ resource helpers Mikhail Kshevetskiy
2026-07-27 18:10 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 18/35] pinctrl: airoha: fix edge-triggered interrupts handling Mikhail Kshevetskiy
2026-07-27 18:03 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 19/35] pinctrl: airoha: remove not needed irq_type[] array Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 20/35] pinctrl: airoha: move common definitions to the separate header Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 21/35] pinctrl: airoha: split driver on shared code and SoC specific drivers Mikhail Kshevetskiy
2026-07-27 18:09 ` sashiko-bot [this message]
2026-07-27 17:41 ` [PATCH v8 22/35] pinctrl: airoha: an7581: remove en7581 prefix from variable names Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 23/35] pinctrl: airoha: an7583: remove an7583 prefix from variable names and definitions Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 24/35] pinctrl: airoha: an7583: rename registers to match its an7583 names Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 25/35] pinctrl: airoha: an7583: add support for npu_uart pinmux Mikhail Kshevetskiy
2026-07-27 18:07 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 26/35] dt-bindings: pinctrl: airoha: an7583: add npu_uart pin group Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 27/35] pinctrl: airoha: an7583: add support for pon_alt pinmux Mikhail Kshevetskiy
2026-07-27 18:10 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 28/35] dt-bindings: pinctrl: airoha: an7583: add pon_alt pin group Mikhail Kshevetskiy
2026-07-27 20:14 ` Krzysztof Kozlowski
2026-07-27 17:41 ` [PATCH v8 29/35] pinctrl: airoha: an7583: add support for olt pinmux Mikhail Kshevetskiy
2026-07-27 18:11 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 30/35] dt-bindings: pinctrl: airoha: an7583: add olt function/group Mikhail Kshevetskiy
2026-07-27 20:15 ` Krzysztof Kozlowski
2026-07-27 17:41 ` [PATCH v8 31/35] pinctrl: airoha: add support of en7523 SoC Mikhail Kshevetskiy
2026-07-27 18:15 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 32/35] pinctrl: airoha: try to find chip scu node by phandle first Mikhail Kshevetskiy
2026-07-27 18:11 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 33/35] dt-bindings: pinctrl: airoha: add support of en7523 pin controller Mikhail Kshevetskiy
2026-07-27 18:20 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 34/35] pinctrl: airoha: add support of an7563 SoC Mikhail Kshevetskiy
2026-07-27 18:16 ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 35/35] dt-bindings: pinctrl: airoha: add support of an7563 pin controller Mikhail Kshevetskiy
2026-07-27 20:12 ` [PATCH v8 00/35] pinctrl: airoha: split on shared and SoC drivers, add more SoCs Krzysztof Kozlowski
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=20260727180920.B9D2B1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=mikhail.kshevetskiy@iopsys.eu \
--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 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.