Commit e402ee0
scsi: core: Use a switch statement when attaching VPD pages
The original code used if statements to update discovered VPD pages when
found. This had the side-effect of not breaking the loop when a page was
found.
Use an idiomatic switch statement instead.
Signed-off-by: Chaohai Chen <wdhh6@aliyun.com>
Link: https://lore.kernel.org/r/20250226065802.234144-1-wdhh6@aliyun.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent ffd6c17 commit e402ee0
1 file changed
+20
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
| 513 | + | |
| 514 | + | |
514 | 515 | | |
515 | | - | |
| 516 | + | |
| 517 | + | |
516 | 518 | | |
517 | | - | |
| 519 | + | |
| 520 | + | |
518 | 521 | | |
519 | | - | |
| 522 | + | |
| 523 | + | |
520 | 524 | | |
521 | | - | |
| 525 | + | |
| 526 | + | |
522 | 527 | | |
523 | | - | |
| 528 | + | |
| 529 | + | |
524 | 530 | | |
525 | | - | |
| 531 | + | |
| 532 | + | |
526 | 533 | | |
527 | | - | |
| 534 | + | |
| 535 | + | |
528 | 536 | | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
529 | 541 | | |
530 | 542 | | |
531 | 543 | | |
| |||
0 commit comments