xfs: remove unreachable code
PATCH 1/1 xfs: remove unreachable code
Clean up the following smatch warning:
fs/xfs/xfs_icache.c:1768 xfs_icwalk() warn: ignoring unreachable code.
Reported-by Abaci Robot <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- fs/xfs/xfs_icache.c | 1 - 1 file changed, 1 deletion(-)
fs/xfs/xfs_icache.c +0 -1
@@ -1765,7 +1765,6 @@ xfs_icwalk( } }return last_error; -BUILD_BUG_ON (XFS_ICWALK_PRIVATE_FLAGS &XFS_ICWALK_FLAGS_VALID ); }#ifdef DEBUG
Signature · 1 line
2.20.1.7.g153144c
Quoted 15 lines · Jiapeng Chong
Clean up the following smatch warning:
fs/xfs/xfs_icache.c:1768xfs_icwalk()warn: ignoring unreachable code.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- fs/xfs/xfs_icache.c | 1 - 1 file changed, 1 deletion(-)fs/xfs/xfs_icache.c +0
-0
fs/xfs/xfs_icache.c xfs_icwalk( · line 1768
Quoted 4 lines
fs/xfs/xfs_icache.c +0
-1@@ -1765,7 +1765,6 @@ xfs_icwalk( } }return last_error; -BUILD_BUG_ON (XFS_ICWALK_PRIVATE_FLAGS &XFS_ICWALK_FLAGS_VALID );
<cough> Do you know what you're removing?
--D
Quoted 6 lines
fs/xfs/xfs_icache.c +0
-0}#ifdef DEBUG Signature · 1 line
2.20.1.7.g153144c
Quoted 7 lines · Darrick J. Wong
fs/xfs/xfs_icache.c xfs_icwalk( · line 1768
Quoted 5 lines
fs/xfs/xfs_icache.c +0
-1@@ -1765,7 +1765,6 @@ xfs_icwalk( } }return last_error; -BUILD_BUG_ON (XFS_ICWALK_PRIVATE_FLAGS &XFS_ICWALK_FLAGS_VALID );<cough> Do you know what you're removing?
That being said hiding this behind the return is rather odd. The normal placement in most of the kernel is at the beginning of a function.