scsi: core: Rename status_byte to sg_status_byte
authorMike Christie <michael.christie@oracle.com>
Tue, 22 Nov 2022 03:26:01 +0000 (21:26 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 1 Dec 2022 03:22:23 +0000 (03:22 +0000)
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>
drivers/scsi/scsi_ioctl.c
drivers/scsi/sg.c
include/scsi/sg.h

index fdd47565a3115daa33d0d1929108642e83f431c1..1126a265d5ee2296ce2f9ce5e162ada30b564031 100644 (file)
@@ -376,7 +376,7 @@ static int scsi_complete_sghdr_rq(struct request *rq, struct sg_io_hdr *hdr,
         * fill in all the output members
         */
        hdr->status = scmd->result & 0xff;
-       hdr->masked_status = status_byte(scmd->result);
+       hdr->masked_status = sg_status_byte(scmd->result);
        hdr->msg_status = COMMAND_COMPLETE;
        hdr->host_status = host_byte(scmd->result);
        hdr->driver_status = 0;
index ce34a8ad53b4e9d99501e043be2d81c2476748f2..d61d8d0d165819edd1629ad74068e59db63cc8b5 100644 (file)
@@ -1349,7 +1349,7 @@ sg_rq_end_io(struct request *rq, blk_status_t status)
                struct scsi_sense_hdr sshdr;
 
                srp->header.status = 0xff & result;
-               srp->header.masked_status = status_byte(result);
+               srp->header.masked_status = sg_status_byte(result);
                srp->header.msg_status = COMMAND_COMPLETE;
                srp->header.host_status = host_byte(result);
                srp->header.driver_status = driver_byte(result);
index 068e35d365575fc56df3924acd7f444c4b624580..af31cecd9012a1b5c9e9889d094b19b1c41cde98 100644 (file)
@@ -159,7 +159,7 @@ struct compat_sg_io_hdr {
 #define TASK_ABORTED         0x20
 
 /* Obsolete status_byte() declaration */
-#define status_byte(result) (((result) >> 1) & 0x7f)
+#define sg_status_byte(result) (((result) >> 1) & 0x7f)
 
 typedef struct sg_scsi_id { /* used by SG_GET_SCSI_ID ioctl() */
     int host_no;        /* as in "scsi<n>" where 'n' is one of 0, 1, 2 etc */