public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ZFS: fix some warnings, cleanup
@ 2012-09-19 15:32 Pavel Herrmann
  2012-09-23 15:31 ` Pavel Herrmann
  2012-10-16  0:33 ` Tom Rini
  0 siblings, 2 replies; 5+ messages in thread
From: Pavel Herrmann @ 2012-09-19 15:32 UTC (permalink / raw)
  To: u-boot

Fix warnings about type mismatch in cmd_zfs.
Dont use a global block_dev_desc, instead use a local one in each cmd.

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
---
 common/cmd_zfs.c     | 7 +++++--
 fs/zfs/zfs.c         | 2 --
 include/zfs_common.h | 3 ---
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/common/cmd_zfs.c b/common/cmd_zfs.c
index a6ea2c0..42e286e 100644
--- a/common/cmd_zfs.c
+++ b/common/cmd_zfs.c
@@ -46,7 +46,8 @@
 #define DOS_FS_TYPE_OFFSET	0x36
 #define DOS_FS32_TYPE_OFFSET	0x52
 
-static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc,
+	char * const argv[])
 {
 	char *filename = NULL;
 	char *ep;
@@ -60,6 +61,7 @@ static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 	const char *addr_str;
 	struct zfs_file zfile;
 	struct device_s vdev;
+	struct block_dev_desc *zfs_dev_desc;
 
 	if (argc < 3)
 		return CMD_RET_USAGE;
@@ -178,7 +180,7 @@ int zfs_print(const char *entry, const struct zfs_dirhook_info *data)
 
 
 
-static int do_zfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_zfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	const char *filename = "/";
 	int dev;
@@ -186,6 +188,7 @@ static int do_zfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 	char *ep;
 	int part_length;
 	struct device_s vdev;
+	struct block_dev_desc *zfs_dev_desc;
 
 	if (argc < 3)
 		return cmd_usage(cmdtp);
diff --git a/fs/zfs/zfs.c b/fs/zfs/zfs.c
index 360f723..d709e02 100644
--- a/fs/zfs/zfs.c
+++ b/fs/zfs/zfs.c
@@ -31,8 +31,6 @@
 #include <asm/byteorder.h>
 #include "zfs_common.h"
 
-block_dev_desc_t *zfs_dev_desc;
-
 /*
  * The zfs plug-in routines for GRUB are:
  *
diff --git a/include/zfs_common.h b/include/zfs_common.h
index 04e73d0..fa0919a 100644
--- a/include/zfs_common.h
+++ b/include/zfs_common.h
@@ -66,9 +66,6 @@ struct zfs_filesystem {
 	block_dev_desc_t *dev_desc;
 };
 
-
-extern block_dev_desc_t *zfs_dev_desc;
-
 struct device_s {
 	uint64_t part_length;
 };
-- 
1.7.12

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

end of thread, other threads:[~2012-10-16 13:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-19 15:32 [U-Boot] [PATCH] ZFS: fix some warnings, cleanup Pavel Herrmann
2012-09-23 15:31 ` Pavel Herrmann
2012-09-23 15:38   ` Marek Vasut
2012-10-16  0:33 ` Tom Rini
2012-10-16 13:38   ` Pavel Herrmann

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