Another round of sonarlint work

This commit is contained in:
Jasmine Iwanek
2023-06-28 13:46:28 -04:00
parent b750471e5c
commit 1116aadb6f
135 changed files with 2425 additions and 1355 deletions

View File

@@ -498,6 +498,9 @@ mo_atapi_phase_to_scsi(mo_t *dev)
return 1;
case 3:
return 7;
default:
break;
}
} else {
if ((dev->phase & 3) == 3)
@@ -569,6 +572,9 @@ mo_mode_sense_read(mo_t *dev, uint8_t page_control, uint8_t page, uint8_t pos)
else
return mo_mode_sense_pages_default.pages[page][pos];
break;
default:
break;
}
return 0;
@@ -1419,6 +1425,9 @@ mo_command(scsi_common_t *sc, uint8_t *cdb)
dev->sector_pos = (((uint32_t) cdb[2]) << 24) | (((uint32_t) cdb[3]) << 16) | (((uint32_t) cdb[4]) << 8) | ((uint32_t) cdb[5]);
mo_log("MO %i: Length: %i, LBA: %i\n", dev->id, dev->sector_len, dev->sector_pos);
break;
default:
break;
}
if (!dev->sector_len) {
@@ -1512,6 +1521,9 @@ mo_command(scsi_common_t *sc, uint8_t *cdb)
dev->sector_len = (((uint32_t) cdb[6]) << 24) | (((uint32_t) cdb[7]) << 16) | (((uint32_t) cdb[8]) << 8) | ((uint32_t) cdb[9]);
dev->sector_pos = (((uint32_t) cdb[2]) << 24) | (((uint32_t) cdb[3]) << 16) | (((uint32_t) cdb[4]) << 8) | ((uint32_t) cdb[5]);
break;
default:
break;
}
if ((dev->sector_pos >= dev->drv->medium_size) /* ||
@@ -1637,6 +1649,9 @@ mo_command(scsi_common_t *sc, uint8_t *cdb)
case 3: /* Load the disk (close tray). */
mo_reload(dev->id);
break;
default:
break;
}
mo_command_complete(dev);
@@ -1744,6 +1759,9 @@ mo_command(scsi_common_t *sc, uint8_t *cdb)
case GPCMD_SEEK_10:
pos = (cdb[2] << 24) | (cdb[3] << 16) | (cdb[4] << 8) | cdb[5];
break;
default:
break;
}
mo_seek(dev, pos);
mo_command_complete(dev);
@@ -1782,6 +1800,9 @@ mo_command(scsi_common_t *sc, uint8_t *cdb)
case GPCMD_ERASE_12:
dev->sector_len = (((uint32_t) cdb[6]) << 24) | (((uint32_t) cdb[7]) << 16) | (((uint32_t) cdb[8]) << 8) | ((uint32_t) cdb[9]);
break;
default:
break;
}
/*Erase all remaining sectors*/
@@ -1804,6 +1825,9 @@ mo_command(scsi_common_t *sc, uint8_t *cdb)
case GPCMD_ERASE_12:
dev->sector_pos = (((uint32_t) cdb[2]) << 24) | (((uint32_t) cdb[3]) << 16) | (((uint32_t) cdb[4]) << 8) | ((uint32_t) cdb[5]);
break;
default:
break;
}
dev->sector_pos += previous_pos;
@@ -1958,6 +1982,9 @@ mo_phase_data_out(scsi_common_t *sc)
return 0;
}
break;
default:
break;
}
mo_command_stop((scsi_common_t *) dev);