From: Christian Engelmayer <cengelma@gmx.at>
To: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>, Zefan Li <lizefan@huawei.com>,
Jiri Pirko <jiri@resnulli.us>
Subject: [PATCH] wan: dlci: Remove unused netdev_priv pointer
Date: Sat, 8 Feb 2014 00:21:10 +0100 [thread overview]
Message-ID: <20140208002110.56c980e9@spike> (raw)
[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]
Remove occurrences of unused pointer to network device private data in
functions dlci_header() and dlci_receive().
Detected by Coverity: CID 139844, CID 139845.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
---
drivers/net/wan/dlci.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c
index 0d1c759..19f7cb2 100644
--- a/drivers/net/wan/dlci.c
+++ b/drivers/net/wan/dlci.c
@@ -71,12 +71,9 @@ static int dlci_header(struct sk_buff *skb, struct net_device *dev,
const void *saddr, unsigned len)
{
struct frhdr hdr;
- struct dlci_local *dlp;
unsigned int hlen;
char *dest;
- dlp = netdev_priv(dev);
-
hdr.control = FRAD_I_UI;
switch (type)
{
@@ -107,11 +104,9 @@ static int dlci_header(struct sk_buff *skb, struct net_device *dev,
static void dlci_receive(struct sk_buff *skb, struct net_device *dev)
{
- struct dlci_local *dlp;
struct frhdr *hdr;
int process, header;
- dlp = netdev_priv(dev);
if (!pskb_may_pull(skb, sizeof(*hdr))) {
netdev_notice(dev, "invalid data no header\n");
dev->stats.rx_errors++;
--
1.8.3.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2014-02-07 23:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 23:21 Christian Engelmayer [this message]
2014-02-10 2:41 ` [PATCH] wan: dlci: Remove unused netdev_priv pointer 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=20140208002110.56c980e9@spike \
--to=cengelma@gmx.at \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=lizefan@huawei.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).