[U-Boot] [PATCH] ZFS: fix some warnings, cleanup

Pavel Herrmann morpheus.ibis at gmail.com
Sun Sep 23 17:31:30 CEST 2012


Add some CCs

On Wednesday 19 September 2012 17:32:36 Pavel Herrmann wrote:
> 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 at 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;
>  };


More information about the U-Boot mailing list