public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/3] cmd/sqfs.c, include/fs.h: fix build failures, don't expose do_sqfs_*() functions globally
Date: Wed, 15 Jul 2020 22:11:41 +0200	[thread overview]
Message-ID: <20200715201143.2168632-2-thomas.petazzoni@bootlin.com> (raw)
In-Reply-To: <20200715201143.2168632-1-thomas.petazzoni@bootlin.com>

The cmd_tbl_t type has been removed upstream since commit 09140113108
("command: Remove the cmd_tbl_t typedef"), so we must use "struct
cmd_tbl" instead.

The <command.h> include was missing in cmd/sqfs.c, without which
U_BOOT_CMD() is not defined.

Finally, there is no reason to globally expose do_sqfs_ls() and
do_sqfs_load(), they are only used within cmd/sqfs.c. This allows to
drop the do_sqfs_load() prototype from include/fs.h.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 cmd/sqfs.c   |  5 +++--
 include/fs.h | 12 ------------
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/cmd/sqfs.c b/cmd/sqfs.c
index af42df728b..177008e802 100644
--- a/cmd/sqfs.c
+++ b/cmd/sqfs.c
@@ -7,10 +7,11 @@
  * squashfs.c:	implements SquashFS related commands
  */
 
+#include <command.h>
 #include <fs.h>
 #include <squashfs.h>
 
-int do_sqfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sqfs_ls(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[])
 {
 	return do_ls(cmdtp, flag, argc, argv, FS_TYPE_SQUASHFS);
 }
@@ -22,7 +23,7 @@ U_BOOT_CMD(
 	"    - list files from 'dev' on 'interface' in 'directory'\n"
 );
 
-int do_sqfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_sqfs_load(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[])
 {
 	return do_load(cmdtp, flag, argc, argv, FS_TYPE_SQUASHFS);
 }
diff --git a/include/fs.h b/include/fs.h
index 19f4afc482..0794b50d10 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -42,18 +42,6 @@ int do_fat_fsload(struct cmd_tbl *cmdtp, int flag, int argc,
  */
 int do_ext2load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 
-
-/**
- * do_sqfs_load - Run the sqfsload command
- *
- * @cmdtp: Command information for sqfsload
- * @flag: Command flags (CMD_FLAG_...)
- * @argc: Number of arguments
- * @argv: List of arguments
- * @return result (see enum command_ret_t)
- */
-int do_sqfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
-
 /*
  * Tell the fs layer which block device an partition to use for future
  * commands. This also internally identifies the filesystem that is present
-- 
2.26.2

  reply	other threads:[~2020-07-15 20:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 17:51 [PATCH 0/4] Add support for the SquashFS filesystem Joao Marcos Costa
2020-07-09 17:51 ` [PATCH 1/4] fs/squashfs: new filesystem Joao Marcos Costa
2020-07-09 19:50   ` Rasmus Villemoes
2020-07-09 20:19     ` Joao Marcos Costa
2020-07-10  8:29     ` Thomas Petazzoni
2020-07-10  8:54       ` Rasmus Villemoes
2020-07-10  9:13         ` Thomas Petazzoni
2020-07-15 21:56           ` Tom Rini
2020-07-15 21:55   ` Tom Rini
2020-07-09 17:51 ` [PATCH 2/4] fs/squashfs: add filesystem commands Joao Marcos Costa
2020-07-09 17:51 ` [PATCH 3/4] fs/squashfs: add sources for zlib decompression Joao Marcos Costa
2020-07-15 19:37   ` Thomas Petazzoni
2020-07-09 17:51 ` [PATCH 4/4] fs/squashfs: add support " Joao Marcos Costa
2020-07-15 20:11 ` [PATCH 0/3] squashfs fixes Thomas Petazzoni
2020-07-15 20:11   ` Thomas Petazzoni [this message]
2020-07-15 20:11   ` [PATCH 2/3] fs/squashfs: use "struct disk_partition" instead of "disk_partition_t" Thomas Petazzoni
2020-07-15 20:11   ` [PATCH 3/3] fs/squashfs: do not use CMD_RET_* defines in the filesystem code Thomas Petazzoni
2020-07-16  7:51   ` [PATCH 0/3] squashfs fixes Joao Marcos Costa
2020-07-16  8:33     ` Thomas Petazzoni
2020-07-15 20:22 ` [PATCH] fs/squashfs/sqfs.c: use sqfs_read_sblk() in sqfs_probe() Thomas Petazzoni

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=20200715201143.2168632-2-thomas.petazzoni@bootlin.com \
    --to=thomas.petazzoni@bootlin.com \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox