From: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
To: netdev@vger.kernel.org
Cc: Jon Maloy <jon.maloy@ericsson.com>, Ying Xue <ying.xue@windriver.com>
Subject: [PATCH] tipc: remove unnecessary call to dev_net()
Date: Wed, 6 Sep 2017 11:08:06 +0200 [thread overview]
Message-ID: <20170906090806.20931-1-kleber.souza@canonical.com> (raw)
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
next reply other threads:[~2017-09-06 9:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 9:08 Kleber Sacilotto de Souza [this message]
2017-09-06 12:50 ` [PATCH] tipc: remove unnecessary call to dev_net() Ying Xue
2017-09-07 4:26 ` David Miller
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=20170906090806.20931-1-kleber.souza@canonical.com \
--to=kleber.souza@canonical.com \
--cc=jon.maloy@ericsson.com \
--cc=netdev@vger.kernel.org \
--cc=ying.xue@windriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox