[PATCH 06/13] [net-next] net: replace linux/gpio.h inclusions
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Tue Jun 30 06:28:39 PDT 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Duplicate inclusion of `<linux/gpio/consumer.h>` caused by an unchecked find-and-replace.
--
commit cb55ce48e23e6753d04ac5f664585feb999f1fcd
Author: Arnd Bergmann <arnd at arndb.de>
net: replace linux/gpio.h inclusions
This commit replaces obsolete linux/gpio.h includes with linux/gpio/consumer.h
or linux/gpio/legacy.h across various network drivers where possible.
> diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> index 48b94ce774906..88c5c52e0e381 100644
> --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> @@ -16,7 +16,7 @@
> #include <linux/net_tstamp.h>
> #include <linux/ptp_classify.h>
> #include <linux/ptp_pch.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/consumer.h>
[Severity: Low]
Does this create a duplicate include in pch_gbe_main.c?
Since linux/gpio/consumer.h is already included earlier in the file alongside
linux/gpio/machine.h, changing this include results in it being included
twice. Can this replaced include simply be removed?
>
> #define PCH_GBE_MAR_ENTRIES 16
[ ... ]
> diff --git a/drivers/net/phy/mdio_device.c b/drivers/net/phy/mdio_device.c
> index 56080d3d2d25e..a18263d5bb029 100644
> --- a/drivers/net/phy/mdio_device.c
> +++ b/drivers/net/phy/mdio_device.c
> @@ -8,7 +8,7 @@
>
> #include <linux/delay.h>
> #include <linux/errno.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/consumer.h>
> #include <linux/gpio/consumer.h>
[Severity: Low]
Did the automated replacement result in consecutive duplicate includes here?
It looks like mdio_device.c already included linux/gpio/consumer.h right below
the old linux/gpio.h include. Should we just drop the old include entirely
instead of replacing it?
> #include <linux/init.h>
> #include <linux/interrupt.h>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260629132633.1300009-1-arnd@kernel.org?part=6
More information about the linux-phy
mailing list