linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] block: add default clause for unsupported T10_PI types
@ 2019-09-21 22:00 Max Gurtovoy
  2019-09-21 22:12 ` Jens Axboe
  0 siblings, 1 reply; 9+ messages in thread
From: Max Gurtovoy @ 2019-09-21 22:00 UTC (permalink / raw)
  To: linux-block, axboe, martin.petersen; +Cc: Max Gurtovoy

kbuild robot reported the following warning:

block/t10-pi.c: In function 't10_pi_verify':
block/t10-pi.c:62:3: warning: enumeration value 'T10_PI_TYPE0_PROTECTION'
                     not handled in switch [-Wswitch]
      switch (type) {
      ^~~~~~

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
---
 block/t10-pi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/block/t10-pi.c b/block/t10-pi.c
index 0c0120a..57f304a 100644
--- a/block/t10-pi.c
+++ b/block/t10-pi.c
@@ -79,6 +79,9 @@ static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter,
 			    pi->ref_tag == T10_PI_REF_ESCAPE)
 				goto next;
 			break;
+		default:
+			/* Currently we support only TYPE1/2/3 */
+			BUG();
 		}
 
 		csum = fn(iter->data_buf, iter->interval);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-09-23 14:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-21 22:00 [PATCH 1/1] block: add default clause for unsupported T10_PI types Max Gurtovoy
2019-09-21 22:12 ` Jens Axboe
2019-09-21 22:54   ` Martin K. Petersen
2019-09-21 23:29     ` Jens Axboe
2019-09-22  9:38       ` Max Gurtovoy
2019-09-22 16:25         ` Jens Axboe
2019-09-22 17:31           ` Martin K. Petersen
2019-09-22 21:21             ` Max Gurtovoy
2019-09-23 14:05               ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).