Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: core: Rename status_byte to sg_status_byte

The next patch adds a helper status_byte function that works like
host_byte, so this patch renames the old status_byte to sg_status_byte
since it's only used for SG IO.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20221122032603.32766-3-michael.christie@oracle.com
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Mike Christie and committed by
Martin K. Petersen
c9293c11 255c4f4a

+3 -3
+1 -1
drivers/scsi/scsi_ioctl.c
··· 376 376 * fill in all the output members 377 377 */ 378 378 hdr->status = scmd->result & 0xff; 379 - hdr->masked_status = status_byte(scmd->result); 379 + hdr->masked_status = sg_status_byte(scmd->result); 380 380 hdr->msg_status = COMMAND_COMPLETE; 381 381 hdr->host_status = host_byte(scmd->result); 382 382 hdr->driver_status = 0;
+1 -1
drivers/scsi/sg.c
··· 1349 1349 struct scsi_sense_hdr sshdr; 1350 1350 1351 1351 srp->header.status = 0xff & result; 1352 - srp->header.masked_status = status_byte(result); 1352 + srp->header.masked_status = sg_status_byte(result); 1353 1353 srp->header.msg_status = COMMAND_COMPLETE; 1354 1354 srp->header.host_status = host_byte(result); 1355 1355 srp->header.driver_status = driver_byte(result);
+1 -1
include/scsi/sg.h
··· 159 159 #define TASK_ABORTED 0x20 160 160 161 161 /* Obsolete status_byte() declaration */ 162 - #define status_byte(result) (((result) >> 1) & 0x7f) 162 + #define sg_status_byte(result) (((result) >> 1) & 0x7f) 163 163 164 164 typedef struct sg_scsi_id { /* used by SG_GET_SCSI_ID ioctl() */ 165 165 int host_no; /* as in "scsi<n>" where 'n' is one of 0, 1, 2 etc */