public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [2.6 patch] drivers/mtd/: possible cleanups
@ 2005-11-05 16:29 Adrian Bunk
  0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2005-11-05 16:29 UTC (permalink / raw)
  To: dwmw2; +Cc: linux-mtd, linux-kernel

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 <bunk@stusta.de>

---

 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;

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [2.6 patch] drivers/mtd/: possible cleanups
@ 2005-11-08 13:49 Adrian Bunk
  0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2005-11-08 13:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mtd, dwmw2, linux-kernel

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 <bunk@stusta.de>

---

This patch was already sent on:
- 5 Nov 2005

 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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-08 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-05 16:29 [2.6 patch] drivers/mtd/: possible cleanups Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2005-11-08 13:49 Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox