Skip to content

Commit c9293c1

Browse files
mikechristiemartinkpetersen
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 255c4f4 commit c9293c1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/scsi/scsi_ioctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ static int scsi_complete_sghdr_rq(struct request *rq, struct sg_io_hdr *hdr,
376376
* fill in all the output members
377377
*/
378378
hdr->status = scmd->result & 0xff;
379-
hdr->masked_status = status_byte(scmd->result);
379+
hdr->masked_status = sg_status_byte(scmd->result);
380380
hdr->msg_status = COMMAND_COMPLETE;
381381
hdr->host_status = host_byte(scmd->result);
382382
hdr->driver_status = 0;

drivers/scsi/sg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ sg_rq_end_io(struct request *rq, blk_status_t status)
13491349
struct scsi_sense_hdr sshdr;
13501350

13511351
srp->header.status = 0xff & result;
1352-
srp->header.masked_status = status_byte(result);
1352+
srp->header.masked_status = sg_status_byte(result);
13531353
srp->header.msg_status = COMMAND_COMPLETE;
13541354
srp->header.host_status = host_byte(result);
13551355
srp->header.driver_status = driver_byte(result);

include/scsi/sg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ struct compat_sg_io_hdr {
159159
#define TASK_ABORTED 0x20
160160

161161
/* Obsolete status_byte() declaration */
162-
#define status_byte(result) (((result) >> 1) & 0x7f)
162+
#define sg_status_byte(result) (((result) >> 1) & 0x7f)
163163

164164
typedef struct sg_scsi_id { /* used by SG_GET_SCSI_ID ioctl() */
165165
int host_no; /* as in "scsi<n>" where 'n' is one of 0, 1, 2 etc */

0 commit comments

Comments
 (0)