From 266c8381b82c278978634b7df27bc3baa3d59ad0 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 7 Aug 2016 07:53:34 -0700 Subject: [PATCH] scst: Suppress compiler warnings about IS_ERR_VALUE() for kernel v4.7 --- scst/src/dev_handlers/scst_disk.c | 2 +- scst/src/scst_lib.c | 4 ++-- scst/src/scst_targ.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scst/src/dev_handlers/scst_disk.c b/scst/src/dev_handlers/scst_disk.c index 44de236b7..1bc2ff215 100644 --- a/scst/src/dev_handlers/scst_disk.c +++ b/scst/src/dev_handlers/scst_disk.c @@ -381,7 +381,7 @@ static void disk_cmd_done(void *data, char *sense, int result, int resid) TRACE_DBG("work %p, cmd %p, left %d, result %d, sense %p, resid %d", work, work->cmd, work->left, result, sense, resid); - WARN_ON_ONCE(IS_ERR_VALUE(result)); + WARN_ON_ONCE(IS_ERR_VALUE((long)result)); if (status_byte(result) == GOOD) goto out_complete; diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index da2ff7c5f..16d1d6603 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8289,8 +8289,8 @@ static void scsi_end_async(struct request *req, int error) lockdep_assert_held(req->q->queue_lock); #endif - errors = req->errors && !IS_ERR_VALUE(req->errors) ? req->errors : - IS_ERR_VALUE(req->errors) || error ? + errors = req->errors && !IS_ERR_VALUE((long)req->errors) ? req->errors : + IS_ERR_VALUE((long)req->errors) || error ? SAM_STAT_CHECK_CONDITION : 0; if (sioc->done) diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 7c4165276..0f510b127 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -2181,7 +2181,7 @@ static void scst_do_cmd_done(struct scst_cmd *cmd, int result, scst_set_exec_time(cmd); - WARN_ON_ONCE(IS_ERR_VALUE(result)); + WARN_ON_ONCE(IS_ERR_VALUE((long)result)); cmd->status = result & 0xff; cmd->msg_status = msg_byte(result);