summaryrefslogtreecommitdiffstats
path: root/fs/attr.c
diff options
context:
space:
mode:
authorMax Gurtovoy <maxg@mellanox.com>2019-09-22 12:46:55 +0300
committerJens Axboe <axboe@kernel.dk>2019-09-23 08:05:19 -0600
commitbe21683e48f26032199504fb60b9a27eeff05fc3 (patch)
tree678d2c0db0f36f9314eddcbfe2ca7186b2876851 /fs/attr.c
parenteb09b3cc464d2c3bbde9a6648603c8d599ea8582 (diff)
downloadlinux-be21683e48f26032199504fb60b9a27eeff05fc3.tar.bz2
block: t10-pi: fix -Wswitch warning
Changing the switch() statement to symbolic constants made the compiler (at least clang-9, did not check gcc) notice that there is one enum value that is not handled here: block/t10-pi.c:62:11: error: enumeration value 'T10_PI_TYPE0_PROTECTION' not handled in switch [-Werror,-Wswitch] Add a BUG_ON statement if we ever get to t10_pi_verify function with TYPE0 and replace the switch() statement with if/else clause for the valid types. Fixes: 9b2061b1a262 ("block: use symbolic constants for t10_pi type") Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Max Gurtovoy <maxg@mellanox.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/attr.c')
0 files changed, 0 insertions, 0 deletions