From ad29e6d095a7f30f0fdb7a8d20c132545fe9711f Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sun, 8 Feb 2009 21:59:48 -0600 Subject: [PATCH] --- yaml --- r: 136263 b: refs/heads/master c: f290f1970f01287eaaffc798a677594a57ebd65e h: refs/heads/master i: 136261: 56ed92ab711e295d855deb3c56bdff48dc56ae1f 136259: b3039d97c5d5e81726faa12bc9cf6284968d60c6 136255: 02c7edfe4d2ff718beefa6b765435d98db0e6130 v: v3 --- [refs] | 2 +- trunk/block/cmd-filter.c | 1 + trunk/include/scsi/scsi.h | 19 ++----------------- trunk/include/scsi/scsi_cmnd.h | 15 +++++++++++++++ 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index 9e8725de5cef..d45c47537a7d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 97218a1499391b174ea95e05b7a40fbb73e79813 +refs/heads/master: f290f1970f01287eaaffc798a677594a57ebd65e diff --git a/trunk/block/cmd-filter.c b/trunk/block/cmd-filter.c index 504b275e1b90..572bbc2f900d 100644 --- a/trunk/block/cmd-filter.c +++ b/trunk/block/cmd-filter.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/trunk/include/scsi/scsi.h b/trunk/include/scsi/scsi.h index 80d7f60e2663..084478e14d24 100644 --- a/trunk/include/scsi/scsi.h +++ b/trunk/include/scsi/scsi.h @@ -9,7 +9,8 @@ #define _SCSI_SCSI_H #include -#include + +struct scsi_cmnd; /* * The maximum number of SG segments that we will put inside a @@ -439,22 +440,6 @@ static inline int scsi_is_wlun(unsigned int lun) #define host_byte(result) (((result) >> 16) & 0xff) #define driver_byte(result) (((result) >> 24) & 0xff) -static inline void set_msg_byte(struct scsi_cmnd *cmd, char status) -{ - cmd->result |= status << 8; -} - -static inline void set_host_byte(struct scsi_cmnd *cmd, char status) -{ - cmd->result |= status << 16; -} - -static inline void set_driver_byte(struct scsi_cmnd *cmd, char status) -{ - cmd->result |= status << 24; -} - - #define sense_class(sense) (((sense) >> 4) & 0x7) #define sense_error(sense) ((sense) & 0xf) #define sense_valid(sense) ((sense) & 0x80); diff --git a/trunk/include/scsi/scsi_cmnd.h b/trunk/include/scsi/scsi_cmnd.h index 855bf95963e7..43b50d36925c 100644 --- a/trunk/include/scsi/scsi_cmnd.h +++ b/trunk/include/scsi/scsi_cmnd.h @@ -291,4 +291,19 @@ static inline struct scsi_data_buffer *scsi_prot(struct scsi_cmnd *cmd) #define scsi_for_each_prot_sg(cmd, sg, nseg, __i) \ for_each_sg(scsi_prot_sglist(cmd), sg, nseg, __i) +static inline void set_msg_byte(struct scsi_cmnd *cmd, char status) +{ + cmd->result |= status << 8; +} + +static inline void set_host_byte(struct scsi_cmnd *cmd, char status) +{ + cmd->result |= status << 16; +} + +static inline void set_driver_byte(struct scsi_cmnd *cmd, char status) +{ + cmd->result |= status << 24; +} + #endif /* _SCSI_SCSI_CMND_H */