[2.6 patch] drivers/mtd/: possible cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch contains the following possible cleanups:
- every file should #include the headers containing the prototypes for
  it's global functions
- make needlessly global functions static


Signed-off-by: Adrian Bunk <[email protected]>

---

 drivers/mtd/chips/cfi_probe.c   |    2 +-
 drivers/mtd/devices/block2mtd.c |    2 +-
 drivers/mtd/ftl.c               |    2 +-
 drivers/mtd/maps/physmap.c      |    1 +
 drivers/mtd/nand/nandsim.c      |    2 +-
 5 files changed, 5 insertions(+), 4 deletions(-)

--- linux-2.6.14-rc5-mm1-full/drivers/mtd/ftl.c.old	2005-11-05 16:40:16.000000000 +0100
+++ linux-2.6.14-rc5-mm1-full/drivers/mtd/ftl.c	2005-11-05 16:40:26.000000000 +0100
@@ -1084,7 +1084,7 @@
 	.owner		= THIS_MODULE,
 };
 
-int init_ftl(void)
+static int init_ftl(void)
 {
 	DEBUG(0, "$Id: ftl.c,v 1.55 2005/01/17 13:47:21 hvr Exp $\n");
 
--- linux-2.6.14-rc5-mm1-full/drivers/mtd/chips/cfi_probe.c.old	2005-11-05 16:42:08.000000000 +0100
+++ linux-2.6.14-rc5-mm1-full/drivers/mtd/chips/cfi_probe.c	2005-11-05 16:42:17.000000000 +0100
@@ -426,7 +426,7 @@
 	.module		= THIS_MODULE
 };
 
-int __init cfi_probe_init(void)
+static int __init cfi_probe_init(void)
 {
 	register_mtd_chip_driver(&cfi_chipdrv);
 	return 0;
--- linux-2.6.14-rc5-mm1-full/drivers/mtd/devices/block2mtd.c.old	2005-11-05 16:43:07.000000000 +0100
+++ linux-2.6.14-rc5-mm1-full/drivers/mtd/devices/block2mtd.c	2005-11-05 16:43:15.000000000 +0100
@@ -40,7 +40,7 @@
 
 
 #define PAGE_READAHEAD 64
-void cache_readahead(struct address_space *mapping, int index)
+static void cache_readahead(struct address_space *mapping, int index)
 {
 	filler_t *filler = (filler_t*)mapping->a_ops->readpage;
 	int i, pagei;
--- linux-2.6.14-rc5-mm1-full/drivers/mtd/maps/physmap.c.old	2005-11-05 16:43:54.000000000 +0100
+++ linux-2.6.14-rc5-mm1-full/drivers/mtd/maps/physmap.c	2005-11-05 16:44:08.000000000 +0100
@@ -19,6 +19,7 @@
 #include <linux/mtd/map.h>
 #include <linux/config.h>
 #include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
 
 static struct mtd_info *mymtd;
 
--- linux-2.6.14-rc5-mm1-full/drivers/mtd/nand/nandsim.c.old	2005-11-05 16:44:45.000000000 +0100
+++ linux-2.6.14-rc5-mm1-full/drivers/mtd/nand/nandsim.c	2005-11-05 16:44:56.000000000 +0100
@@ -1486,7 +1486,7 @@
 /*
  * Module initialization function
  */
-int __init ns_init_module(void)
+static int __init ns_init_module(void)
 {
 	struct nand_chip *chip;
 	struct nandsim *nand;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux