All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Helmut Grohne <helmut.grohne@intenta.de>
Cc: Woojung Huh <woojung.huh@microchip.com>,
	Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org
Subject: Re: [RFC PATCH] net: dsa: microchip: delete dead code
Date: Wed, 22 Jul 2020 16:39:53 +0200	[thread overview]
Message-ID: <20200722143953.GA1339445@lunn.ch> (raw)
In-Reply-To: <20200721083300.GA12970@laureti-dev>

On Tue, Jul 21, 2020 at 10:33:01AM +0200, Helmut Grohne wrote:
> None of the removed assignments is ever read back and never influences
> logic.
> 
> Signed-off-by: Helmut Grohne <helmut.grohne@intenta.de>

Hi Helmut

This patch probably is correct. But it is not obviously correct,
because there are so many changes at once. Please could you break it
up.

> @@ -31,10 +31,7 @@ struct ksz_port {
>  	struct phy_device phydev;
>  
>  	u32 on:1;			/* port is not disabled by hardware */
> -	u32 phy:1;			/* port has a PHY */
>  	u32 fiber:1;			/* port is fiber */
> -	u32 sgmii:1;			/* port is SGMII */
> -	u32 force:1;
>  	u32 read:1;			/* read MIB counters in background */
>  	u32 freeze:1;			/* MIB counter freeze is enabled */
>  
> @@ -71,9 +68,7 @@ struct ksz_device {
>  	int reg_mib_cnt;
>  	int mib_cnt;
>  	int mib_port_cnt;
> -	int last_port;			/* ports after that not used */
>  	phy_interface_t interface;
> -	u32 regs_size;
>  	bool phy_errata_9477;
>  	bool synclko_125;
>  
> @@ -84,14 +79,9 @@ struct ksz_device {
>  	unsigned long mib_read_interval;
>  	u16 br_member;
>  	u16 member;
> -	u16 live_ports;
> -	u16 on_ports;			/* ports enabled by DSA */
> -	u16 rx_ports;
> -	u16 tx_ports;
>  	u16 mirror_rx;
>  	u16 mirror_tx;
>  	u32 features;			/* chip specific features */
> -	u32 overrides;			/* chip functions set by user */
>  	u16 host_mask;
>  	u16 port_mask;

So at minimum, break it up into 3 patches, one per structure.  I would
even go further.

Small patches are easier to review. And if something does break, a git
bisect gives you more information about what change broke it.

Thanks
	Andrew

  reply	other threads:[~2020-07-22 14:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21  8:33 [RFC PATCH] net: dsa: microchip: delete dead code Helmut Grohne
2020-07-22 14:39 ` Andrew Lunn [this message]
2020-07-23  4:24   ` Helmut Grohne
2020-07-25 17:41     ` Andrew Lunn
2020-08-17 14:55       ` [PATCH v2 0/6] " Helmut Grohne
2020-08-17 14:55         ` [PATCH v2 1/6] net: dsa: microchip: delete unused member ksz_port.phy Helmut Grohne
2020-08-17 14:55         ` [PATCH v2 2/6] net: dsa: microchip: delete unused member ksz_port.sgmii Helmut Grohne
2020-08-17 14:55         ` [PATCH v2 3/6] net: dsa: microchip: delete unused member ksz_port.force Helmut Grohne
2020-08-17 14:55         ` [PATCH v2 4/6] net: dsa: microchip: delete unused member ksz_device.last_port Helmut Grohne
2020-08-17 14:59         ` [PATCH v2 5/6] net: dsa: microchip: delete unused member ksz_device.regs_size Helmut Grohne
2020-08-17 14:59         ` [PATCH v2 6/6] net: dsa: microchip: delete unused member ksz_device.overrides Helmut Grohne
2020-08-17 15:18         ` [PATCH v2 0/6] net: dsa: microchip: delete dead code Florian Fainelli
2020-08-18  7:57           ` Helmut Grohne

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=20200722143953.GA1339445@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=helmut.grohne@intenta.de \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    --cc=woojung.huh@microchip.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.