diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-02-02 02:56:05 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-04 03:47:12 -0500 |
commit | 29f319275e7637b3d146aa67db7fad036339fcc1 (patch) | |
tree | 1c01694114b5bd2416591610f02c56065fa1473a /fs | |
parent | d062d90c35f292b3e6ee266746259e2e2950f940 (diff) |
xfs: fix xfs_mode_to_ftype() prototype
commit fd29f7af75b7adf250beccffa63746c6a88e2b74 upstream.
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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/libxfs/xfs_dir2.c | 2 | ||||
-rw-r--r-- | 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 1a978bd9d506..7825d78d4587 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 }; | |||
38 | /* | 38 | /* |
39 | * Convert inode mode to directory entry filetype | 39 | * Convert inode mode to directory entry filetype |
40 | */ | 40 | */ |
41 | const unsigned char xfs_mode_to_ftype(int mode) | 41 | unsigned char xfs_mode_to_ftype(int mode) |
42 | { | 42 | { |
43 | switch (mode & S_IFMT) { | 43 | switch (mode & S_IFMT) { |
44 | case S_IFREG: | 44 | case S_IFREG: |
diff --git a/fs/xfs/libxfs/xfs_dir2.h b/fs/xfs/libxfs/xfs_dir2.h index 0051a34b8c3f..ae0d55bf6500 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; | |||
37 | /* | 37 | /* |
38 | * Convert inode mode to directory entry filetype | 38 | * Convert inode mode to directory entry filetype |
39 | */ | 39 | */ |
40 | extern const unsigned char xfs_mode_to_ftype(int mode); | 40 | extern unsigned char xfs_mode_to_ftype(int mode); |
41 | 41 | ||
42 | /* | 42 | /* |
43 | * directory operations vector for encode/decode routines | 43 | * directory operations vector for encode/decode routines |