Skip to content

Commit

Permalink
xfs: fix xfs_mode_to_ftype() prototype
Browse files Browse the repository at this point in the history
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: 1fc4d33 ("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>
  • Loading branch information
arndb authored and djwong committed Jan 18, 2017
1 parent 657bdfb commit fd29f7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/xfs/libxfs/xfs_dir2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion fs/xfs/libxfs/xfs_dir2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd29f7a

Please sign in to comment.