diff --git a/iscsi-scst/kernel/iscsi.h b/iscsi-scst/kernel/iscsi.h index e7afc2e62..bbfa594dd 100644 --- a/iscsi-scst/kernel/iscsi.h +++ b/iscsi-scst/kernel/iscsi.h @@ -518,7 +518,7 @@ static inline int test_write_ready(struct iscsi_conn *conn) * No need for write_list protection, in the worst case we will be * restarted again. */ - return (!list_empty(&conn->write_list) || conn->write_cmnd); + return !list_empty(&conn->write_list) || conn->write_cmnd; } static inline void conn_get(struct iscsi_conn *conn) diff --git a/iscsi-scst/kernel/iscsi_hdr.h b/iscsi-scst/kernel/iscsi_hdr.h index d279d4233..5c94e4324 100644 --- a/iscsi-scst/kernel/iscsi_hdr.h +++ b/iscsi-scst/kernel/iscsi_hdr.h @@ -515,7 +515,7 @@ struct iscsi_nop_in_hdr { #define cmnd_ttt(cmnd) cpu_to_be32((cmnd)->pdu.bhs.ttt) #define cmnd_itt(cmnd) cpu_to_be32((cmnd)->pdu.bhs.itt) #define cmnd_opcode(cmnd) ((cmnd)->pdu.bhs.opcode & ISCSI_OPCODE_MASK) -#define cmnd_scsicode(cmnd) cmnd_hdr(cmnd)->scb[0] +#define cmnd_scsicode(cmnd) (cmnd_hdr((cmnd))->scb[0]) #endif /* __ISCSI_HDR_H__ */ diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index ad76189fc..c92d0844e 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -432,12 +432,11 @@ static int vdisk_attach(struct scst_device *dev) #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) if ((fd->f_op == NULL) || (fd->f_op->readv == NULL) || - (fd->f_op->writev == NULL)) + (fd->f_op->writev == NULL)) { #else if ((fd->f_op == NULL) || (fd->f_op->aio_read == NULL) || - (fd->f_op->aio_write == NULL)) + (fd->f_op->aio_write == NULL)) { #endif - { PRINT_ERROR("%s", "Wrong f_op or FS doesn't have " "required capabilities"); res = -EINVAL; diff --git a/scst/src/scst_priv.h b/scst/src/scst_priv.h index c4c086764..5f5c49c47 100644 --- a/scst/src/scst_priv.h +++ b/scst/src/scst_priv.h @@ -408,19 +408,19 @@ void scst_process_reset(struct scst_device *dev, static inline int scst_is_ua_command(struct scst_cmd *cmd) { - return ((cmd->cdb[0] != INQUIRY) && - (cmd->cdb[0] != REQUEST_SENSE) && - (cmd->cdb[0] != REPORT_LUNS)); + return cmd->cdb[0] != INQUIRY + && cmd->cdb[0] != REQUEST_SENSE + && cmd->cdb[0] != REPORT_LUNS; } static inline int scst_is_implicit_hq(struct scst_cmd *cmd) { - return ((cmd->cdb[0] == INQUIRY) || - (cmd->cdb[0] == REPORT_LUNS) || - ((cmd->dev->type == TYPE_DISK) && - ((cmd->cdb[0] == READ_CAPACITY) || - ((cmd->cdb[0] == SERVICE_ACTION_IN) && - ((cmd->cdb[1] & 0x1f) == SAI_READ_CAPACITY_16))))); + return cmd->cdb[0] == INQUIRY + || cmd->cdb[0] == REPORT_LUNS + || (cmd->dev->type == TYPE_DISK + && (cmd->cdb[0] == READ_CAPACITY + || (cmd->cdb[0] == SERVICE_ACTION_IN + && (cmd->cdb[1] & 0x1f) == SAI_READ_CAPACITY_16))); } /*