mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Rokos <michal@rokos.info>
To: linux-net@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [Patch 2.6] Net - Exclude uneeded code when ! CONFIG_PROC_FS
Date: Fri, 15 Oct 2004 14:34:57 +0200	[thread overview]
Message-ID: <200410151434.57217.michal@rokos.info> (raw)

Hello,

just tiny fixes for ! CONFIG_PROC_FS configuration.

It removes few "unused code" warnings.

Tested by compilation only. (With CONFIG_PROC_FS on and off)

Michal

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/10/15 13:26:25+02:00 michal@nb-rokos.nx.cz 
#   Fixes for ifdef code wrapping for ! CONFIG_PROC_FS setup.
# 
# net/irda/ircomm/ircomm_tty.c
#   2004/10/15 13:26:12+02:00 michal@nb-rokos.nx.cz +1 -1
#   Move ifdef more on top, so no /proc related code is compiled when ! 
CONFIG_PROC_FS.
# 
# net/ipv6/tcp_ipv6.c
#   2004/10/15 13:26:11+02:00 michal@nb-rokos.nx.cz +1 -1
#   Move ifdef more on top, so no /proc related code is compiled when ! 
CONFIG_PROC_FS.
# 
# net/ipv6/route.c
#   2004/10/15 13:26:11+02:00 michal@nb-rokos.nx.cz +2 -0
#   Fix 1 missing bit for ! CONFIG_PROC_FS setup.
# 
# net/ipv6/netfilter/ip6_queue.c
#   2004/10/15 13:26:11+02:00 michal@nb-rokos.nx.cz +2 -0
#   Exclude /proc related code when ! CONFIG_PROC_FS.
# 
# net/core/neighbour.c
#   2004/10/15 13:26:11+02:00 michal@nb-rokos.nx.cz +3 -0
#   Fix 1 missing bit for ! CONFIG_PROC_FS setup.
# 
diff -Nru a/net/core/neighbour.c b/net/core/neighbour.c
--- a/net/core/neighbour.c 2004-10-15 14:25:44 +02:00
+++ b/net/core/neighbour.c 2004-10-15 14:25:44 +02:00
@@ -61,7 +61,10 @@
 
 static int neigh_glbl_allocs;
 static struct neigh_table *neigh_tables;
+
+#ifdef CONFIG_PROC_FS
 static struct file_operations neigh_stat_seq_fops;
+#endif
 
 /*
    Neighbour hash table buckets are protected with rwlock tbl->lock.
diff -Nru a/net/ipv6/netfilter/ip6_queue.c 
b/net/ipv6/netfilter/ip6_queue.c
--- a/net/ipv6/netfilter/ip6_queue.c 2004-10-15 14:25:44 +02:00
+++ b/net/ipv6/netfilter/ip6_queue.c 2004-10-15 14:25:44 +02:00
@@ -622,6 +622,7 @@
  { .ctl_name = 0 }
 };
 
+#ifdef CONFIG_PROC_FS
 static int
 ipq_get_info(char *buffer, char **start, off_t offset, int length)
 {
@@ -651,6 +652,7 @@
   len = 0;
  return len;
 }
+#endif
 
 static int
 init_or_cleanup(int init)
diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c
--- a/net/ipv6/route.c 2004-10-15 14:25:44 +02:00
+++ b/net/ipv6/route.c 2004-10-15 14:25:44 +02:00
@@ -2066,7 +2066,9 @@
 
 void __init ip6_route_init(void)
 {
+#ifdef  CONFIG_PROC_FS
  struct proc_dir_entry *p;
+#endif
 
  ip6_dst_ops.kmem_cachep = kmem_cache_create("ip6_dst_cache",
            sizeof(struct rt6_info),
diff -Nru a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
--- a/net/ipv6/tcp_ipv6.c 2004-10-15 14:25:44 +02:00
+++ b/net/ipv6/tcp_ipv6.c 2004-10-15 14:25:44 +02:00
@@ -1960,6 +1960,7 @@
 }
 
 /* Proc filesystem TCPv6 sock list dumping. */
+#ifdef CONFIG_PROC_FS
 static void get_openreq6(struct seq_file *seq, 
     struct sock *sk, struct open_request *req, int i, int uid)
 {
@@ -2070,7 +2071,6 @@
      atomic_read(&tw->tw_refcnt), tw);
 }
 
-#ifdef CONFIG_PROC_FS
 static int tcp6_seq_show(struct seq_file *seq, void *v)
 {
  struct tcp_iter_state *st;
diff -Nru a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
--- a/net/irda/ircomm/ircomm_tty.c 2004-10-15 14:25:44 +02:00
+++ b/net/irda/ircomm/ircomm_tty.c 2004-10-15 14:25:44 +02:00
@@ -1268,6 +1268,7 @@
  self->flow = cmd;
 }
 
+#ifdef CONFIG_PROC_FS
 static int ircomm_tty_line_info(struct ircomm_tty_cb *self, char *buf)
 {
         int  ret=0;
@@ -1377,7 +1378,6 @@
  *    
  *
  */
-#ifdef CONFIG_PROC_FS
 static int ircomm_tty_read_proc(char *buf, char **start, off_t offset, 
int len,
     int *eof, void *unused)
 {


                 reply	other threads:[~2004-10-15 12:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200410151434.57217.michal@rokos.info \
    --to=michal@rokos.info \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@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

all inboxes | Powered by JetHome®