Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1561892 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2017-01-18 16:20 +0100 |
| Last post | 2017-01-18 22:00 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] xfs: fix xfs_mode_to_ftype() prototype Arnd Bergmann <arnd@arndb.de> - 2017-01-18 16:20 +0100
Re: [PATCH] xfs: fix xfs_mode_to_ftype() prototype Christoph Hellwig <hch@infradead.org> - 2017-01-18 18:00 +0100
Re: [PATCH] xfs: fix xfs_mode_to_ftype() prototype "Darrick J. Wong" <darrick.wong@oracle.com> - 2017-01-18 22:00 +0100
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-01-18 16:20 +0100 |
| Subject | [PATCH] xfs: fix xfs_mode_to_ftype() prototype |
| Message-ID | <t10bN-5IB-41@gated-at.bofh.it> |
A harmless warning just got introduced:
fs/xfs/libxfs/xfs_dir2.h:40:8: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
Removing the 'const' modifier avoids the warning and has no
other effect.
Fixes: 1fc4d33fed12 ("xfs: replace xfs_mode_to_ftype table with switch statement")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
fs/xfs/libxfs/xfs_dir2.c | 2 +-
fs/xfs/libxfs/xfs_dir2.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_dir2.c b/fs/xfs/libxfs/xfs_dir2.c
index eb64f3884d3d..2f389d366e93 100644
--- a/fs/xfs/libxfs/xfs_dir2.c
+++ b/fs/xfs/libxfs/xfs_dir2.c
@@ -38,7 +38,7 @@ struct xfs_name xfs_name_dotdot = { (unsigned char *)"..", 2, XFS_DIR3_FT_DIR };
/*
* Convert inode mode to directory entry filetype
*/
-const unsigned char xfs_mode_to_ftype(int mode)
+unsigned char xfs_mode_to_ftype(int mode)
{
switch (mode & S_IFMT) {
case S_IFREG:
diff --git a/fs/xfs/libxfs/xfs_dir2.h b/fs/xfs/libxfs/xfs_dir2.h
index d4b77ab37a98..d6e6d9d16f6c 100644
--- a/fs/xfs/libxfs/xfs_dir2.h
+++ b/fs/xfs/libxfs/xfs_dir2.h
@@ -37,7 +37,7 @@ extern struct xfs_name xfs_name_dotdot;
/*
* Convert inode mode to directory entry filetype
*/
-extern const unsigned char xfs_mode_to_ftype(int mode);
+extern unsigned char xfs_mode_to_ftype(int mode);
/*
* directory operations vector for encode/decode routines
--
2.9.0
[toc] | [next] | [standalone]
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Date | 2017-01-18 18:00 +0100 |
| Message-ID | <t11Ky-6w7-25@gated-at.bofh.it> |
| In reply to | #1561892 |
Looks fine, Reviewed-by: Christoph Hellwig <hch@lst.de>
[toc] | [prev] | [next] | [standalone]
| From | "Darrick J. Wong" <darrick.wong@oracle.com> |
|---|---|
| Date | 2017-01-18 22:00 +0100 |
| Message-ID | <t15uO-vl-17@gated-at.bofh.it> |
| In reply to | #1561892 |
On Wed, Jan 18, 2017 at 04:12:58PM +0100, Arnd Bergmann wrote:
> A harmless warning just got introduced:
>
> fs/xfs/libxfs/xfs_dir2.h:40:8: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
>
> Removing the 'const' modifier avoids the warning and has no
> other effect.
>
> Fixes: 1fc4d33fed12 ("xfs: replace xfs_mode_to_ftype table with switch statement")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied, thanks.
--D
> ---
> fs/xfs/libxfs/xfs_dir2.c | 2 +-
> fs/xfs/libxfs/xfs_dir2.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/xfs/libxfs/xfs_dir2.c b/fs/xfs/libxfs/xfs_dir2.c
> index eb64f3884d3d..2f389d366e93 100644
> --- a/fs/xfs/libxfs/xfs_dir2.c
> +++ b/fs/xfs/libxfs/xfs_dir2.c
> @@ -38,7 +38,7 @@ struct xfs_name xfs_name_dotdot = { (unsigned char *)"..", 2, XFS_DIR3_FT_DIR };
> /*
> * Convert inode mode to directory entry filetype
> */
> -const unsigned char xfs_mode_to_ftype(int mode)
> +unsigned char xfs_mode_to_ftype(int mode)
> {
> switch (mode & S_IFMT) {
> case S_IFREG:
> diff --git a/fs/xfs/libxfs/xfs_dir2.h b/fs/xfs/libxfs/xfs_dir2.h
> index d4b77ab37a98..d6e6d9d16f6c 100644
> --- a/fs/xfs/libxfs/xfs_dir2.h
> +++ b/fs/xfs/libxfs/xfs_dir2.h
> @@ -37,7 +37,7 @@ extern struct xfs_name xfs_name_dotdot;
> /*
> * Convert inode mode to directory entry filetype
> */
> -extern const unsigned char xfs_mode_to_ftype(int mode);
> +extern unsigned char xfs_mode_to_ftype(int mode);
>
> /*
> * directory operations vector for encode/decode routines
> --
> 2.9.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web