All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: dwmw2@infradead.org
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/mtd/: possible cleanups
Date: Sat, 5 Nov 2005 17:29:12 +0100	[thread overview]
Message-ID: <20051105162912.GI5368@stusta.de> (raw)

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;

             reply	other threads:[~2005-11-05 16:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-05 16:29 Adrian Bunk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-11-08 13:49 [2.6 patch] drivers/mtd/: possible cleanups Adrian Bunk
2005-11-08 13:49 ` Adrian Bunk

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=20051105162912.GI5368@stusta.de \
    --to=bunk@stusta.de \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.