diff options
Diffstat (limited to 'hw/scsi')
-rw-r--r-- | hw/scsi/megasas.c | 5 | ||||
-rw-r--r-- | hw/scsi/scsi-generic.c | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index a9ffc32682..d1772183cf 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -410,17 +410,14 @@ static void megasas_encode_lba(uint8_t *cdb, uint64_t lba, static uint64_t megasas_fw_time(void) { struct tm curtime; - uint64_t bcd_time; qemu_get_timedate(&curtime, 0); - bcd_time = ((uint64_t)curtime.tm_sec & 0xff) << 48 | + return ((uint64_t)curtime.tm_sec & 0xff) << 48 | ((uint64_t)curtime.tm_min & 0xff) << 40 | ((uint64_t)curtime.tm_hour & 0xff) << 32 | ((uint64_t)curtime.tm_mday & 0xff) << 24 | ((uint64_t)curtime.tm_mon & 0xff) << 16 | ((uint64_t)(curtime.tm_year + 1900) & 0xffff); - - return bcd_time; } /* diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c index 71372a8383..6a2d89afba 100644 --- a/hw/scsi/scsi-generic.c +++ b/hw/scsi/scsi-generic.c @@ -579,10 +579,7 @@ const SCSIReqOps scsi_generic_req_ops = { static SCSIRequest *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun, uint8_t *buf, void *hba_private) { - SCSIRequest *req; - - req = scsi_req_alloc(&scsi_generic_req_ops, d, tag, lun, hba_private); - return req; + return scsi_req_alloc(&scsi_generic_req_ops, d, tag, lun, hba_private); } static Property scsi_generic_properties[] = { |