From 089f839a782523eeb54e1f1e4beb3695d43df1c6 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 13 Nov 2017 16:47:10 +0000 Subject: [PATCH] scst: Address two checkpatch warnings git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7264 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 7 ++++--- scst/src/scst_lib.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index 329c62425..e08d52a2a 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -5536,7 +5536,7 @@ static inline void prepare_to_wait_exclusive_head(struct wait_queue_head *wq_hea * * Caller must hold lock of type @lock_type on @lock. */ -#define wait_event_locked(wq, condition, lock_type, lock) \ +#define wait_event_locked(wq, condition, lock_type, lock) do { \ if (!(condition)) { \ DEFINE_WAIT(__wait); \ \ @@ -5550,7 +5550,8 @@ if (!(condition)) { \ spin_ ## lock_type(&(lock)); \ } while (!(condition)); \ finish_wait(&(wq), &__wait); \ -} +} \ +} while (0) /* Only use get_unaligned_be24() if reading p - 1 is allowed. */ static inline uint32_t get_unaligned_be24(const uint8_t *const p) @@ -5721,7 +5722,7 @@ ssize_t scst_writev(struct file *file, const struct iovec *vec, unsigned long vlen, loff_t *pos); void scst_write_same(struct scst_cmd *cmd, struct scst_data_descriptor *where); int scst_scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, - int data_direction, void *buffer, unsigned bufflen, + int data_direction, void *buffer, unsigned int bufflen, unsigned char *sense, int timeout, int retries, u64 flags); diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index cad0bc4dc..c7c1241ec 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -6875,7 +6875,7 @@ out: } int scst_scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, - int data_direction, void *buffer, unsigned bufflen, + int data_direction, void *buffer, unsigned int bufflen, unsigned char *sense, int timeout, int retries, u64 flags) { return scsi_execute(sdev, cmd, data_direction, buffer, bufflen, sense,