[-mm patch] drivers/mtd/ubi/: make code static

Adrian Bunk bunk at stusta.de
Wed Mar 28 08:11:41 EDT 2007


On Mon, Mar 26, 2007 at 08:57:06PM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.21-rc4-mm1:
>...
>  git-ubi.patch
>...
>  git trees
>...


This patch makes needlessly global code static.

Signed-off-by: Adrian Bunk <bunk at stusta.de>

---

 drivers/mtd/ubi/eba.c  |    4 ++--
 drivers/mtd/ubi/vtbl.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.21-rc5-mm2/drivers/mtd/ubi/eba.c.old	2007-03-27 23:36:48.000000000 +0200
+++ linux-2.6.21-rc5-mm2/drivers/mtd/ubi/eba.c	2007-03-27 23:38:05.000000000 +0200
@@ -489,8 +489,8 @@ out_unlock:
  * Returns new physical eraseblock number in case of success, and a negative
  * error code in case of failure.
  */
-int recover_peb(struct ubi_device *ubi, int pnum, int vol_id, int lnum,
-		const void *buf, int offset, int len)
+static int recover_peb(struct ubi_device *ubi, int pnum, int vol_id, int lnum,
+		       const void *buf, int offset, int len)
 {
 	int err, idx = vol_id2idx(ubi, vol_id), new_pnum, data_size, tries = 0;
 	struct ubi_volume *vol = ubi->volumes[idx];
--- linux-2.6.21-rc5-mm2/drivers/mtd/ubi/vtbl.c.old	2007-03-27 23:38:54.000000000 +0200
+++ linux-2.6.21-rc5-mm2/drivers/mtd/ubi/vtbl.c	2007-03-27 23:39:08.000000000 +0200
@@ -68,7 +68,7 @@ static void paranoid_vtbl_check(const st
 #endif
 
 /* Empty volume table record */
-struct ubi_vtbl_record empty_vtbl_record;
+static struct ubi_vtbl_record empty_vtbl_record;
 
 /**
  * ubi_change_vtbl_record - change volume table record.





More information about the linux-mtd mailing list