* [PATCH] tipc: remove unnecessary call to dev_net()
@ 2017-09-06 9:08 Kleber Sacilotto de Souza
2017-09-06 12:50 ` Ying Xue
2017-09-07 4:26 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Kleber Sacilotto de Souza @ 2017-09-06 9:08 UTC (permalink / raw)
To: netdev; +Cc: Jon Maloy, Ying Xue
The net device is already stored in the 'net' variable, so no need to call
dev_net() again.
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
---
net/tipc/bearer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 89cd061c4468..6d6395e0904e 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -661,7 +661,7 @@ static int tipc_l2_device_event(struct notifier_block *nb, unsigned long evt,
break;
case NETDEV_UNREGISTER:
case NETDEV_CHANGENAME:
- bearer_disable(dev_net(dev), b);
+ bearer_disable(net, b);
break;
}
return NOTIFY_OK;
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tipc: remove unnecessary call to dev_net()
2017-09-06 9:08 [PATCH] tipc: remove unnecessary call to dev_net() Kleber Sacilotto de Souza
@ 2017-09-06 12:50 ` Ying Xue
2017-09-07 4:26 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Ying Xue @ 2017-09-06 12:50 UTC (permalink / raw)
To: Kleber Sacilotto de Souza, netdev; +Cc: Jon Maloy
On 09/06/2017 05:08 PM, Kleber Sacilotto de Souza wrote:
> The net device is already stored in the 'net' variable, so no need to call
> dev_net() again.
>
> Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
> ---
> net/tipc/bearer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
> index 89cd061c4468..6d6395e0904e 100644
> --- a/net/tipc/bearer.c
> +++ b/net/tipc/bearer.c
> @@ -661,7 +661,7 @@ static int tipc_l2_device_event(struct notifier_block *nb, unsigned long evt,
> break;
> case NETDEV_UNREGISTER:
> case NETDEV_CHANGENAME:
> - bearer_disable(dev_net(dev), b);
> + bearer_disable(net, b);
> break;
> }
> return NOTIFY_OK;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tipc: remove unnecessary call to dev_net()
2017-09-06 9:08 [PATCH] tipc: remove unnecessary call to dev_net() Kleber Sacilotto de Souza
2017-09-06 12:50 ` Ying Xue
@ 2017-09-07 4:26 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-09-07 4:26 UTC (permalink / raw)
To: kleber.souza; +Cc: netdev, jon.maloy, ying.xue
From: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Date: Wed, 6 Sep 2017 11:08:06 +0200
> The net device is already stored in the 'net' variable, so no need to call
> dev_net() again.
>
> Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-07 4:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-06 9:08 [PATCH] tipc: remove unnecessary call to dev_net() Kleber Sacilotto de Souza
2017-09-06 12:50 ` Ying Xue
2017-09-07 4:26 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).