Skip to contentSkip to conversation

Small fixes for block t10-pi

PATCH New Ankit Kumar 1 participant 3 messages Sep 8, 2023 1 message not in the archive Block layer

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20230908063508epcas5p12fbca2a5723fa518489cb223ba24ccae@epcas5p1.samsung.com

#1 lore raw

v2 cover Small fixes for block t10-pi

This series has two patches that:
- Removes redundant T10_PI_TYPE2_PROTECTION condition check during t10_pi_verify.
- Removes duplicate module license introduced in an earlier commit.

v2:
- Added Reviewed-by tag for Martin K. Petersen.

Ankit Kumar (2):
block:t10-pi: remove redundant Type2 check during t10 PI verify block:t10-pi: remove duplicate module license

 block/t10-pi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Signature · 1 line
2.25.1
#2 lore raw

PATCH v2 1/2 block:t10-pi: remove redundant Type2 check during t10 PI verify

T10_PI_TYPE2_PROTECTION is neither used to generate nor verify crc and ip. This remained since T10 PI code was moved out of SCSI.

---
 block/t10-pi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
block/t10-pi.c +1 -2
index 914d8cddd43a..bf0bba01417f 100644
@@ -64,8 +64,7 @@ static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter,
 		struct t10_pi_tuple *pi = iter->prot_buf;
 		__be16 csum;
 
-		if (type == T10_PI_TYPE1_PROTECTION ||
-		    type == T10_PI_TYPE2_PROTECTION) {
+		if (type == T10_PI_TYPE1_PROTECTION) {
 			if (pi->app_tag == T10_PI_APP_ESCAPE)
 				goto next;
 
Signature · 1 line
2.25.1
#3 lore raw

PATCH v2 2/2 block:t10-pi: remove duplicate module license

In reply to Ankit Kumar

Remove duplicate MODULE_LICENSE("GPL") from t10-pi.c

Fixes a7d4383f17e1 ("block: add pi for extended integrity")
---
 block/t10-pi.c | 1 -
 1 file changed, 1 deletion(-)
block/t10-pi.c +0 -1
index bf0bba01417f..042f21b0e2e5 100644
@@ -471,4 +471,3 @@ const struct blk_integrity_profile ext_pi_type3_crc64 = {
 EXPORT_SYMBOL_GPL(ext_pi_type3_crc64);
 
 MODULE_LICENSE("GPL");
-MODULE_LICENSE("GPL");
Signature · 1 line
2.25.1