Commit 29f31927 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman

xfs: fix xfs_mode_to_ftype() prototype

commit fd29f7af 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: 1fc4d33f ("xfs: replace xfs_mode_to_ftype table with switch statement")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d062d90c
......@@ -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:
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment