netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Fang <wei.fang@nxp.com>
To: shenwei.wang@nxp.com, xiaoning.wang@nxp.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, eric@nelint.com
Cc: imx@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH net-next 1/5] net: fec: remove useless conditional preprocessor directives
Date: Tue, 11 Nov 2025 18:00:53 +0800	[thread overview]
Message-ID: <20251111100057.2660101-2-wei.fang@nxp.com> (raw)
In-Reply-To: <20251111100057.2660101-1-wei.fang@nxp.com>

The conditional preprocessor directive "#if !defined(CONFIG_M5272)" was
added due to build errors on MCF5272 platform, see commit d13919301d9a
("net: fec: Fix build for MCF5272"). The compilation error was caused by
some register macros not being defined on the MCF5272 platform. However,
this preprocessor directive is not needed in some parts of the driver.
First, removing it will not cause compilation errors. Second, these parts
will check quirks, which do not exist on the MCF7527 platform. Therefore,
we can safely delete these useless preprocessor directives.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
---
 drivers/net/ethernet/freescale/fec_main.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 742f3e81cc7c..e0e84f2979c8 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1773,7 +1773,6 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
 	__fec32 cbd_bufaddr;
 	u32 sub_len = 4;
 
-#if !defined(CONFIG_M5272)
 	/*If it has the FEC_QUIRK_HAS_RACC quirk property, the bit of
 	 * FEC_RACC_SHIFT16 is set by default in the probe function.
 	 */
@@ -1781,7 +1780,6 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
 		data_start += 2;
 		sub_len += 2;
 	}
-#endif
 
 #if defined(CONFIG_COLDFIRE) && !defined(CONFIG_COLDFIRE_COHERENT_DMA)
 	/*
@@ -2515,9 +2513,7 @@ static int fec_enet_mii_probe(struct net_device *ndev)
 		phy_set_max_speed(phy_dev, 1000);
 		phy_remove_link_mode(phy_dev,
 				     ETHTOOL_LINK_MODE_1000baseT_Half_BIT);
-#if !defined(CONFIG_M5272)
 		phy_support_sym_pause(phy_dev);
-#endif
 	}
 	else
 		phy_set_max_speed(phy_dev, 100);
@@ -4400,11 +4396,9 @@ fec_probe(struct platform_device *pdev)
 	fep->num_rx_queues = num_rx_qs;
 	fep->num_tx_queues = num_tx_qs;
 
-#if !defined(CONFIG_M5272)
 	/* default enable pause frame auto negotiation */
 	if (fep->quirks & FEC_QUIRK_HAS_GBIT)
 		fep->pause_flag |= FEC_PAUSE_FLAG_AUTONEG;
-#endif
 
 	/* Select default pin state */
 	pinctrl_pm_select_default_state(&pdev->dev);
-- 
2.34.1


  reply	other threads:[~2025-11-11 10:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-11 10:00 [PATCH net-next 0/5] net: fec: do some cleanup for the driver Wei Fang
2025-11-11 10:00 ` Wei Fang [this message]
2025-11-11 22:15   ` [PATCH net-next 1/5] net: fec: remove useless conditional preprocessor directives Frank Li
2025-11-12 20:13   ` Andrew Lunn
2025-11-13  1:35     ` Wei Fang
2025-11-11 10:00 ` [PATCH net-next 2/5] net: fec: simplify the " Wei Fang
2025-11-11 22:24   ` Frank Li
2025-11-12  1:53     ` Wei Fang
2025-11-13 16:27       ` Frank Li
2025-11-14  2:20         ` Wei Fang
2025-11-18  3:04           ` Wei Fang
2025-11-11 10:00 ` [PATCH net-next 3/5] net: fec: remove struct fec_enet_priv_txrx_info Wei Fang
2025-11-11 22:30   ` Frank Li
2025-11-12  1:56     ` Wei Fang
2025-11-11 10:00 ` [PATCH net-next 4/5] net: fec: remove rx_align from fec_enet_private Wei Fang
2025-11-11 22:34   ` Frank Li
2025-11-12  2:00     ` Wei Fang
2025-11-12 20:25   ` Andrew Lunn
2025-11-13  1:40     ` Wei Fang
2025-11-13 13:10       ` Andrew Lunn
2025-11-14  2:17         ` Wei Fang
2025-11-11 10:00 ` [PATCH net-next 5/5] net: fec: remove duplicate macros of the BD status Wei Fang
2025-11-11 22:39   ` Frank Li

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=20251111100057.2660101-2-wei.fang@nxp.com \
    --to=wei.fang@nxp.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric@nelint.com \
    --cc=imx@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shenwei.wang@nxp.com \
    --cc=xiaoning.wang@nxp.com \
    /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;
as well as URLs for NNTP newsgroup(s).