linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtdcore.c: share syms with mtd_blkdev.c
@ 2007-05-28 19:28 Ben Dooks
  2007-05-29 15:42 ` Josh Boyer
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2007-05-28 19:28 UTC (permalink / raw)
  To: linux-mtd

Fix the sparse warnings generated by the implicit
dependency of mtd_blkdevs.c and mtd_core.c for the
two symbols mtd_table and mtd_table_mutex. This is
done by adding an local header file mtdcore.h to
define these (including the warning about the
non-proliferation of these symbols).

Signed-off-by: Ben Dooks <ben-linux@fluff.org>

--- linux-2.6.22-rc3/drivers/mtd/mtdcore.h	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.22-rc3-sparse1/drivers/mtd/mtdcore.h	2007-05-28 20:14:13.000000000 +0100
@@ -0,0 +1,11 @@
+/* linux/drivers/mtd/mtdcore.h
+ *
+ * Header file for driver private mtdcore exports
+ *
+ */
+
+/* These are exported solely for the purpose of mtd_blkdevs.c. You
+   should not use them for _anything_ else */
+
+extern struct mutex mtd_table_mutex;
+extern struct mtd_info *mtd_table[MAX_MTD_DEVICES];
diff -urpN -X linux-2.6.22-rc3-sparse1//Documentation/dontdiff linux-2.6.22-rc3-sparse1//drivers/mtd/mtd_blkdevs.c linux-2.6.22-rc3-sparse2/drivers/mtd/mtd_blkdevs.c
--- linux-2.6.22-rc3-sparse1//drivers/mtd/mtd_blkdevs.c	2007-05-28 19:45:39.000000000 +0100
+++ linux-2.6.22-rc3-sparse2/drivers/mtd/mtd_blkdevs.c	2007-05-28 20:15:05.000000000 +0100
@@ -23,10 +23,9 @@
 #include <linux/kthread.h>
 #include <asm/uaccess.h>
 
-static LIST_HEAD(blktrans_majors);
+#include "mtdcore.h"
 
-extern struct mutex mtd_table_mutex;
-extern struct mtd_info *mtd_table[];
+static LIST_HEAD(blktrans_majors);
 
 struct mtd_blkcore_priv {
 	struct task_struct *thread;
diff -urpN -X linux-2.6.22-rc3-sparse1//Documentation/dontdiff linux-2.6.22-rc3-sparse1//drivers/mtd/mtdcore.c linux-2.6.22-rc3-sparse2/drivers/mtd/mtdcore.c
--- linux-2.6.22-rc3-sparse1//drivers/mtd/mtdcore.c	2007-04-26 04:08:32.000000000 +0100
+++ linux-2.6.22-rc3-sparse2/drivers/mtd/mtdcore.c	2007-05-28 20:25:28.000000000 +0100
@@ -22,6 +22,8 @@
 
 #include <linux/mtd/mtd.h>
 
+#include "mtdcore.h"
+
 /* These are exported solely for the purpose of mtd_blkdevs.c. You
    should not use them for _anything_ else */
 DEFINE_MUTEX(mtd_table_mutex);

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

* Re: [PATCH] mtdcore.c: share syms with mtd_blkdev.c
  2007-05-28 19:28 [PATCH] mtdcore.c: share syms with mtd_blkdev.c Ben Dooks
@ 2007-05-29 15:42 ` Josh Boyer
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Boyer @ 2007-05-29 15:42 UTC (permalink / raw)
  To: Ben Dooks; +Cc: linux-mtd

On Mon, 2007-05-28 at 20:28 +0100, Ben Dooks wrote:
> Fix the sparse warnings generated by the implicit
> dependency of mtd_blkdevs.c and mtd_core.c for the
> two symbols mtd_table and mtd_table_mutex. This is
> done by adding an local header file mtdcore.h to
> define these (including the warning about the
> non-proliferation of these symbols).

Looks good.

josh

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

end of thread, other threads:[~2007-05-29 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-28 19:28 [PATCH] mtdcore.c: share syms with mtd_blkdev.c Ben Dooks
2007-05-29 15:42 ` Josh Boyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).