]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: fec: simplify the conditional preprocessor directives
authorWei Fang <wei.fang@nxp.com>
Wed, 19 Nov 2025 02:51:45 +0000 (10:51 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Nov 2025 02:40:07 +0000 (18:40 -0800)
commiteef7b786bdab146047d0372eff9f6bd16cffe415
tree89777e7c5cd82a3b30260c8a46a0f50e679bdecf
parent3eea593b5597e580def9658aa6397e1057f27acd
net: fec: simplify the conditional preprocessor directives

From the Kconfig file, we can see CONFIG_FEC depends on the following
platform-related options.

ColdFire: M523x, M527x, M5272, M528x, M520x and M532x
S32: ARCH_S32 (ARM64)
i.MX: SOC_IMX28 and ARCH_MXC (ARM and ARM64)

Based on the code of fec driver, only some macro definitions on the
M5272 platform are different from those on other platforms. Therefore,
we can simplify the following complex preprocessor directives to
"if !defined(CONFIG_M5272)".

"#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || \
     defined(CONFIG_M528x) || defined(CONFIG_M520x) || \
     defined(CONFIG_M532x) || defined(CONFIG_ARM) || \
     defined(CONFIG_ARM64)"

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20251119025148.2817602-3-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/fec.h
drivers/net/ethernet/freescale/fec_main.c