[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1uwep4-00000004ikD-1ZEh@rmk-PC.armlinux.org.uk>
Date: Thu, 11 Sep 2025 11:46:38 +0100
From: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
netdev@...r.kernel.org,
Paolo Abeni <pabeni@...hat.com>,
Richard Cochran <richardcochran@...il.com>,
Vladimir Oltean <olteanv@...il.com>
Subject: [PATCH net-next v2 3/4] net: dsa: mv88e6xxx: remove
chip->evcap_config
evcap_config is only read and written in mv88e6352_config_eventcap(),
so it makes little sense to store it in the global chip struct. Make
it a local variable instead.
Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
--
v2: fix evap_config typo
---
drivers/net/dsa/mv88e6xxx/chip.h | 1 -
drivers/net/dsa/mv88e6xxx/ptp.c | 11 +++++------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h
index 9beaffb2eb12..2f211e55cb47 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.h
+++ b/drivers/net/dsa/mv88e6xxx/chip.h
@@ -424,7 +424,6 @@ struct mv88e6xxx_chip {
struct ptp_clock_info ptp_clock_info;
struct delayed_work tai_event_work;
struct ptp_pin_desc pin_config[MV88E6XXX_MAX_GPIO];
- u16 evcap_config;
u16 enable_count;
/* Current ingress and egress monitor ports */
diff --git a/drivers/net/dsa/mv88e6xxx/ptp.c b/drivers/net/dsa/mv88e6xxx/ptp.c
index 402328b9349b..350f1d5c05f4 100644
--- a/drivers/net/dsa/mv88e6xxx/ptp.c
+++ b/drivers/net/dsa/mv88e6xxx/ptp.c
@@ -175,17 +175,16 @@ static u64 mv88e6165_ptp_clock_read(struct cyclecounter *cc)
static int mv88e6352_config_eventcap(struct mv88e6xxx_chip *chip, int event,
int rising)
{
- u16 global_config;
+ u16 evcap_config;
u16 cap_config;
int err;
- chip->evcap_config = MV88E6XXX_TAI_CFG_CAP_OVERWRITE |
- MV88E6XXX_TAI_CFG_CAP_CTR_START;
+ evcap_config = MV88E6XXX_TAI_CFG_CAP_OVERWRITE |
+ MV88E6XXX_TAI_CFG_CAP_CTR_START;
if (!rising)
- chip->evcap_config |= MV88E6XXX_TAI_CFG_EVREQ_FALLING;
+ evcap_config |= MV88E6XXX_TAI_CFG_EVREQ_FALLING;
- global_config = chip->evcap_config;
- err = mv88e6xxx_tai_write(chip, MV88E6XXX_TAI_CFG, global_config);
+ err = mv88e6xxx_tai_write(chip, MV88E6XXX_TAI_CFG, evcap_config);
if (err)
return err;
--
2.47.3
Powered by blists - more mailing lists