From: Andrew Lunn <andrew@lunn•ch>
To: Michael Grzeschik <m.grzeschik@pengutronix•de>
Cc: netdev@vger•kernel.org, f.fainelli@gmail•com,
davem@davemloft•net, kernel@pengutronix•de,
matthias.schiffer@ew•tq-group.com, woojung.huh@microchip•com,
UNGLinuxDriver@microchip•com
Subject: Re: [PATCH 07/11] net: dsa: microchip: remove superfluous num_ports asignment
Date: Thu, 19 Nov 2020 01:32:19 +0100 [thread overview]
Message-ID: <20201119003219.GK1804098@lunn.ch> (raw)
In-Reply-To: <20201118220357.22292-8-m.grzeschik@pengutronix.de>
On Wed, Nov 18, 2020 at 11:03:53PM +0100, Michael Grzeschik wrote:
> The variable num_ports is already assigned in the init function.
> This patch removes the extra assignment of the variable.
>
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix•de>
> ---
> drivers/net/dsa/microchip/ksz8795.c | 2 --
> drivers/net/dsa/microchip/ksz9477.c | 2 --
> 2 files changed, 4 deletions(-)
>
> diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c
> index 7114902495a0ebb..17dc720df2340b0 100644
> --- a/drivers/net/dsa/microchip/ksz8795.c
> +++ b/drivers/net/dsa/microchip/ksz8795.c
> @@ -992,8 +992,6 @@ static void ksz8795_config_cpu_port(struct dsa_switch *ds)
> u8 remote;
> int i;
>
> - ds->num_ports = dev->port_cnt + 1;
> -
> /* Switch marks the maximum frame with extra byte as oversize. */
> ksz_cfg(dev, REG_SW_CTRL_2, SW_LEGAL_PACKET_DISABLE, true);
> ksz_cfg(dev, S_TAIL_TAG_CTRL, SW_TAIL_TAG_ENABLE, true);
> diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
> index abfd3802bb51706..2119965da10ae1e 100644
> --- a/drivers/net/dsa/microchip/ksz9477.c
> +++ b/drivers/net/dsa/microchip/ksz9477.c
> @@ -1267,8 +1267,6 @@ static void ksz9477_config_cpu_port(struct dsa_switch *ds)
> struct ksz_port *p;
> int i;
>
> - ds->num_ports = dev->port_cnt;
Please could you give a clue in the commit message that the init
function handles the difference between these two, the + 1 in ksz8795.
Andrew
next prev parent reply other threads:[~2020-11-19 0:32 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 22:03 [PATCH 00/11] net: dsa: microchip: make ksz8795 driver more dynamic Michael Grzeschik
2020-11-18 22:03 ` [PATCH 01/11] net: dsa: microchip: ksz8795: remove unused last_port variable Michael Grzeschik
2020-11-19 0:05 ` Andrew Lunn
2020-11-19 3:06 ` Florian Fainelli
2020-11-18 22:03 ` [PATCH 02/11] net: dsa: microchip: ksz8795: remove superfluous port_cnt assignment Michael Grzeschik
2020-11-19 0:10 ` Andrew Lunn
2020-11-19 3:07 ` Florian Fainelli
2020-11-18 22:03 ` [PATCH 03/11] net: dsa: microchip: ksz8795: move variable assignments from detect to init Michael Grzeschik
2020-11-19 0:14 ` Andrew Lunn
2020-11-19 3:07 ` Florian Fainelli
2020-11-18 22:03 ` [PATCH 04/11] net: dsa: microchip: ksz8795: use reg_mib_cnt where possible Michael Grzeschik
2020-11-19 0:16 ` Andrew Lunn
2020-11-19 3:08 ` Florian Fainelli
2020-11-18 22:03 ` [PATCH 05/11] net: dsa: microchip: ksz8795: use mib_cnt " Michael Grzeschik
2020-11-19 0:20 ` Andrew Lunn
2020-11-19 7:36 ` Michael Grzeschik
2020-11-19 3:09 ` Florian Fainelli
2020-11-19 7:01 ` kernel test robot
2020-11-18 22:03 ` [PATCH 06/11] net: dsa: microchip: ksz8795: use phy_port_cnt " Michael Grzeschik
2020-11-19 0:29 ` Andrew Lunn
2020-11-19 8:40 ` Michael Grzeschik
2020-11-19 13:59 ` Andrew Lunn
2020-11-19 3:13 ` Florian Fainelli
2020-11-18 22:03 ` [PATCH 07/11] net: dsa: microchip: remove superfluous num_ports asignment Michael Grzeschik
2020-11-19 0:32 ` Andrew Lunn [this message]
2020-11-19 3:10 ` Florian Fainelli
2020-11-18 22:03 ` [PATCH 08/11] net: dsa: microchip: ksz8795: align port_cnt usage with other microchip drivers Michael Grzeschik
2020-11-19 0:35 ` Andrew Lunn
2020-11-19 18:06 ` Tristram.Ha
2020-11-19 3:13 ` Florian Fainelli
2020-11-18 22:03 ` [PATCH 09/11] net: dsa: microchip: remove usage of mib_port_count Michael Grzeschik
2020-11-19 1:13 ` Andrew Lunn
2020-11-19 3:12 ` Florian Fainelli
2020-11-18 22:03 ` [PATCH 10/11] net: dsa: microchip: ksz8795: dynamic allocate memory for flush_dyn_mac_table Michael Grzeschik
2020-11-19 1:21 ` Andrew Lunn
2020-11-19 3:12 ` Florian Fainelli
2020-11-18 22:03 ` [PATCH 11/11] net: dsa: microchip: ksz8795: use num_vlans where possible Michael Grzeschik
2020-11-19 1:22 ` Andrew Lunn
2020-11-19 3:11 ` Florian Fainelli
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=20201119003219.GK1804098@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=UNGLinuxDriver@microchip$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=f.fainelli@gmail$(echo .)com \
--cc=kernel@pengutronix$(echo .)de \
--cc=m.grzeschik@pengutronix$(echo .)de \
--cc=matthias.schiffer@ew$(echo .)tq-group.com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=woojung.huh@microchip$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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