mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Linux Kernel List <linux-kernel@vger.kernel.org>,
	Al Viro <viro@ftp.uk.linux.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: [PATCH] Don't #ifdef prototypes
Date: Thu, 4 Sep 2003 17:09:07 +0100	[thread overview]
Message-ID: <20030904170907.D8414@flint.arm.linux.org.uk> (raw)

It seems that changing CONFIG_BLK_DEV_INITRD causes the whole kernel to
rebuild due to an inappropriate ifdef in linux/fs.h - we should not
conditionalise prototypes.

In addition, real_root_dev is only used by two files (kernel/sysctl.c
and init/do_mounts_initrd.c) so it makes even less sense that it was in
linux/fs.h

--- orig/include/linux/fs.h	Thu Sep  4 16:37:56 2003
+++ linux/include/linux/fs.h	Thu Sep  4 16:34:09 2003
@@ -1372,10 +1372,6 @@
 extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count);
 extern void simple_release_fs(struct vfsmount **mount, int *count);
 
-#ifdef CONFIG_BLK_DEV_INITRD
-extern unsigned int real_root_dev;
-#endif
-
 extern int inode_change_ok(struct inode *, struct iattr *);
 extern int inode_setattr(struct inode *, struct iattr *);
 
--- orig/include/linux/initrd.h	Mon May  5 17:40:12 2003
+++ linux/include/linux/initrd.h	Thu Sep  4 16:34:31 2003
@@ -16,3 +16,5 @@
 /* free_initrd_mem always gets called with the next two as arguments.. */
 extern unsigned long initrd_start, initrd_end;
 extern void free_initrd_mem(unsigned long, unsigned long);
+
+extern unsigned int real_root_dev;
--- orig/kernel/sysctl.c	Wed Aug 13 10:33:59 2003
+++ linux/kernel/sysctl.c	Thu Sep  4 16:34:00 2003
@@ -35,6 +35,7 @@
 #include <linux/writeback.h>
 #include <linux/hugetlb.h>
 #include <linux/security.h>
+#include <linux/initrd.h>
 #include <asm/uaccess.h>
 
 #ifdef CONFIG_ROOT_NFS

-- 
Russell King (rmk@arm.linux.org.uk)	http://www.arm.linux.org.uk/personal/
Maintainer of:
  2.6 ARM Linux   - http://www.arm.linux.org.uk/
  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
  2.6 Serial core



                 reply	other threads:[~2003-09-04 16:09 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=20030904170907.D8414@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=viro@ftp.uk.linux.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

Powered by JetHome