From: "Denis V. Lunev" <den@openvz.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, "Denis V. Lunev" <den@openvz.org>
Subject: [PATCH 2/6 net-2.6.26] [UDP]: No need to check afinfo != NULL in udp_proc_(un)register.
Date: Thu, 27 Mar 2008 17:11:34 +0300 [thread overview]
Message-ID: <1206627098-2456-2-git-send-email-den@openvz.org> (raw)
In-Reply-To: <1206627041.2109.15.camel@iris.sw.ru>
udp_proc_register/udp_proc_unregister are called with a static pointer only.
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
net/ipv4/udp.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 6d740ad..c05f45b 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1631,8 +1631,6 @@ int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo)
struct proc_dir_entry *p;
int rc = 0;
- if (!afinfo)
- return -EINVAL;
afinfo->seq_fops->owner = afinfo->owner;
afinfo->seq_fops->open = udp_seq_open;
afinfo->seq_fops->read = seq_read;
@@ -1649,8 +1647,6 @@ int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo)
void udp_proc_unregister(struct net *net, struct udp_seq_afinfo *afinfo)
{
- if (!afinfo)
- return;
proc_net_remove(net, afinfo->name);
memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops));
}
--
1.5.3.rc5
next prev parent reply other threads:[~2008-03-27 14:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 14:10 [PATCH 0/6 net-2.6.26] [UDP]: udp_proc_register simplification Denis V. Lunev
2008-03-27 14:11 ` [PATCH 1/6 net-2.6.26] [UDP]: Replace struct net on udp_iter_state with seq_net_private Denis V. Lunev
2008-03-27 14:11 ` Denis V. Lunev [this message]
2008-03-27 14:11 ` [PATCH 3/6 net-2.6.26] [UDP]: Move seq_ops from udp_iter_state to udp_seq_afinfo Denis V. Lunev
2008-03-27 14:11 ` [PATCH 4/6 net-2.6.26] [UDP]: Cleanup /proc/udp[6] creation/removal Denis V. Lunev
2008-03-27 14:11 ` [PATCH 5/6 net-2.6.26] [UDP]: Place file operations directly into udp_seq_afinfo Denis V. Lunev
2008-03-27 14:11 ` [PATCH 6/6 net-2.6.26] [UDP]: Remove owner from udp_seq_afinfo Denis V. Lunev
2008-03-29 1:26 ` [PATCH 0/6 net-2.6.26] [UDP]: udp_proc_register simplification 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=1206627098-2456-2-git-send-email-den@openvz.org \
--to=den@openvz.org \
--cc=davem@davemloft.net \
--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).