mirror of https://gitee.com/openkylin/linux.git
scsi: scsi_trace: Use get_unaligned_be24()
This makes the SCSI tracing code slightly easier to read.
Link: https://lore.kernel.org/r/20200313203102.16613-6-bvanassche@acm.org
Fixes: bf81623542
("[SCSI] add scsi trace core functions and put trace points")
Cc: Christoph Hellwig <hch@lst.de>
Cc: James E.J. Bottomley <jejb@linux.ibm.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Reported-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
35b703dbfa
commit
3cef59481a
|
@ -18,11 +18,9 @@ static const char *
|
|||
scsi_trace_rw6(struct trace_seq *p, unsigned char *cdb, int len)
|
||||
{
|
||||
const char *ret = trace_seq_buffer_ptr(p);
|
||||
u32 lba = 0, txlen;
|
||||
u32 lba, txlen;
|
||||
|
||||
lba |= ((cdb[1] & 0x1F) << 16);
|
||||
lba |= (cdb[2] << 8);
|
||||
lba |= cdb[3];
|
||||
lba = get_unaligned_be24(&cdb[1]) & 0x1fffff;
|
||||
/*
|
||||
* From SBC-2: a TRANSFER LENGTH field set to zero specifies that 256
|
||||
* logical blocks shall be read (READ(6)) or written (WRITE(6)).
|
||||
|
|
Loading…
Reference in New Issue