Message ID | 1518906642-13401-3-git-send-email-trini@konsulko.com |
---|---|
State | Superseded |
Delegated to: | Marek Vasut |
Headers | show |
Series | [U-Boot,1/5] sh: Use -m2a-nofpu only | expand |
On 02/17/2018 11:30 PM, Tom Rini wrote: > With a newer toolchain we can see that in both sh_eth_phy_config_legacy > and sh_eth_recv_common the variable port is never referenced as > eth->port is always used instead. > > Cc: Joe Hershberger <joe.hershberger@ni.com> > Signed-off-by: Tom Rini <trini@konsulko.com> > --- > drivers/net/sh_eth.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c > index 850fe1587f59..6f48e93ab53d 100644 > --- a/drivers/net/sh_eth.c > +++ b/drivers/net/sh_eth.c > @@ -517,7 +517,7 @@ static int sh_eth_start_common(struct sh_eth_dev *eth) > #ifndef CONFIG_DM_ETH > static int sh_eth_phy_config_legacy(struct sh_eth_dev *eth) > { > - int port = eth->port, ret = 0; > + int ret = 0; > struct sh_eth_info *port_info = ð->port_info[eth->port]; > struct eth_device *dev = port_info->dev; > struct phy_device *phydev; > @@ -540,7 +540,7 @@ static int sh_eth_send_legacy(struct eth_device *dev, void *packet, int len) > > static int sh_eth_recv_common(struct sh_eth_dev *eth) > { > - int port = eth->port, len = 0; > + int len = 0; > struct sh_eth_info *port_info = ð->port_info[eth->port]; > uchar *packet = (uchar *)ADDR_TO_P2(port_info->rx_desc_cur->rd2); > > This should be fixed in the PR I sent too.
On Sun, Feb 18, 2018 at 10:42 PM, Marek Vasut <marek.vasut@gmail.com> wrote: > On 02/17/2018 11:30 PM, Tom Rini wrote: >> With a newer toolchain we can see that in both sh_eth_phy_config_legacy >> and sh_eth_recv_common the variable port is never referenced as >> eth->port is always used instead. >> >> Cc: Joe Hershberger <joe.hershberger@ni.com> >> Signed-off-by: Tom Rini <trini@konsulko.com> >> --- >> drivers/net/sh_eth.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c >> index 850fe1587f59..6f48e93ab53d 100644 >> --- a/drivers/net/sh_eth.c >> +++ b/drivers/net/sh_eth.c >> @@ -517,7 +517,7 @@ static int sh_eth_start_common(struct sh_eth_dev *eth) >> #ifndef CONFIG_DM_ETH >> static int sh_eth_phy_config_legacy(struct sh_eth_dev *eth) >> { >> - int port = eth->port, ret = 0; >> + int ret = 0; >> struct sh_eth_info *port_info = ð->port_info[eth->port]; >> struct eth_device *dev = port_info->dev; >> struct phy_device *phydev; >> @@ -540,7 +540,7 @@ static int sh_eth_send_legacy(struct eth_device *dev, void *packet, int len) >> >> static int sh_eth_recv_common(struct sh_eth_dev *eth) >> { >> - int port = eth->port, len = 0; >> + int len = 0; >> struct sh_eth_info *port_info = ð->port_info[eth->port]; >> uchar *packet = (uchar *)ADDR_TO_P2(port_info->rx_desc_cur->rd2); >> >> > This should be fixed in the PR I sent too. PR or the series? If you meant the series, then we should probably go with that instead of Tom's patch so that the series doesn't need to respin. -Joe
On 02/19/2018 07:13 PM, Joe Hershberger wrote: > On Sun, Feb 18, 2018 at 10:42 PM, Marek Vasut <marek.vasut@gmail.com> wrote: >> On 02/17/2018 11:30 PM, Tom Rini wrote: >>> With a newer toolchain we can see that in both sh_eth_phy_config_legacy >>> and sh_eth_recv_common the variable port is never referenced as >>> eth->port is always used instead. >>> >>> Cc: Joe Hershberger <joe.hershberger@ni.com> >>> Signed-off-by: Tom Rini <trini@konsulko.com> >>> --- >>> drivers/net/sh_eth.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c >>> index 850fe1587f59..6f48e93ab53d 100644 >>> --- a/drivers/net/sh_eth.c >>> +++ b/drivers/net/sh_eth.c >>> @@ -517,7 +517,7 @@ static int sh_eth_start_common(struct sh_eth_dev *eth) >>> #ifndef CONFIG_DM_ETH >>> static int sh_eth_phy_config_legacy(struct sh_eth_dev *eth) >>> { >>> - int port = eth->port, ret = 0; >>> + int ret = 0; >>> struct sh_eth_info *port_info = ð->port_info[eth->port]; >>> struct eth_device *dev = port_info->dev; >>> struct phy_device *phydev; >>> @@ -540,7 +540,7 @@ static int sh_eth_send_legacy(struct eth_device *dev, void *packet, int len) >>> >>> static int sh_eth_recv_common(struct sh_eth_dev *eth) >>> { >>> - int port = eth->port, len = 0; >>> + int len = 0; >>> struct sh_eth_info *port_info = ð->port_info[eth->port]; >>> uchar *packet = (uchar *)ADDR_TO_P2(port_info->rx_desc_cur->rd2); >>> >>> >> This should be fixed in the PR I sent too. > > PR or the series? PR, I wrapped this patch into mine.
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 850fe1587f59..6f48e93ab53d 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -517,7 +517,7 @@ static int sh_eth_start_common(struct sh_eth_dev *eth) #ifndef CONFIG_DM_ETH static int sh_eth_phy_config_legacy(struct sh_eth_dev *eth) { - int port = eth->port, ret = 0; + int ret = 0; struct sh_eth_info *port_info = ð->port_info[eth->port]; struct eth_device *dev = port_info->dev; struct phy_device *phydev; @@ -540,7 +540,7 @@ static int sh_eth_send_legacy(struct eth_device *dev, void *packet, int len) static int sh_eth_recv_common(struct sh_eth_dev *eth) { - int port = eth->port, len = 0; + int len = 0; struct sh_eth_info *port_info = ð->port_info[eth->port]; uchar *packet = (uchar *)ADDR_TO_P2(port_info->rx_desc_cur->rd2);
With a newer toolchain we can see that in both sh_eth_phy_config_legacy and sh_eth_recv_common the variable port is never referenced as eth->port is always used instead. Cc: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Tom Rini <trini@konsulko.com> --- drivers/net/sh_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)