* [PATCH net-next] hsr: remove unnecessary code in hsr_dev_change_mtu()
@ 2020-04-24 12:43 Taehee Yoo
2020-04-26 3:41 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Taehee Yoo @ 2020-04-24 12:43 UTC (permalink / raw)
To: davem, kuba, netdev; +Cc: ap420073
In the hsr_dev_change_mtu(), the 'dev' and 'master->dev' pointer are
same. So, the 'master' variable and some code are unnecessary.
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
net/hsr/hsr_device.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index fc7027314ad8..cd99f548e440 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -125,13 +125,11 @@ int hsr_get_max_mtu(struct hsr_priv *hsr)
static int hsr_dev_change_mtu(struct net_device *dev, int new_mtu)
{
struct hsr_priv *hsr;
- struct hsr_port *master;
hsr = netdev_priv(dev);
- master = hsr_port_get_hsr(hsr, HSR_PT_MASTER);
if (new_mtu > hsr_get_max_mtu(hsr)) {
- netdev_info(master->dev, "A HSR master's MTU cannot be greater than the smallest MTU of its slaves minus the HSR Tag length (%d octets).\n",
+ netdev_info(dev, "A HSR master's MTU cannot be greater than the smallest MTU of its slaves minus the HSR Tag length (%d octets).\n",
HSR_HLEN);
return -EINVAL;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] hsr: remove unnecessary code in hsr_dev_change_mtu()
2020-04-24 12:43 [PATCH net-next] hsr: remove unnecessary code in hsr_dev_change_mtu() Taehee Yoo
@ 2020-04-26 3:41 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-04-26 3:41 UTC (permalink / raw)
To: ap420073; +Cc: kuba, netdev
From: Taehee Yoo <ap420073@gmail.com>
Date: Fri, 24 Apr 2020 12:43:09 +0000
> In the hsr_dev_change_mtu(), the 'dev' and 'master->dev' pointer are
> same. So, the 'master' variable and some code are unnecessary.
>
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-26 3:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 12:43 [PATCH net-next] hsr: remove unnecessary code in hsr_dev_change_mtu() Taehee Yoo
2020-04-26 3:41 ` David Miller
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.