From c3ad1a50752bafb613b5f0735fd61f838c10b7c1 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Tue, 17 Nov 2009 12:59:49 +0000 Subject: [PATCH] Minor compiler and checkpatch fixes git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1341 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/nthread.c | 3 ++- scst/src/scst_targ.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/iscsi-scst/kernel/nthread.c b/iscsi-scst/kernel/nthread.c index 9819e6930..8b09985e5 100644 --- a/iscsi-scst/kernel/nthread.c +++ b/iscsi-scst/kernel/nthread.c @@ -765,7 +765,7 @@ out: static void process_read_io(struct iscsi_conn *conn, int *closed) { struct iscsi_cmnd *cmnd = conn->read_cmnd; - int res = 0; + int res; TRACE_ENTRY(); @@ -914,6 +914,7 @@ static void process_read_io(struct iscsi_conn *conn, int *closed) default: PRINT_CRIT_ERROR("%d %x", conn->read_state, cmnd_opcode(cmnd)); + res = -1; /* to keep compiler happy */ sBUG(); } } while (res == 0); diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 0e70224d9..a68f57118 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -3499,6 +3499,11 @@ void scst_process_active_cmd(struct scst_cmd *cmd, bool atomic) TRACE_ENTRY(); + /* + * Checkpatch will complain on the use of in_atomic() below. You + * can safely ignore this warning since in_atomic() is used here only + * for debugging purposes. + */ EXTRACHECKS_BUG_ON(in_irq() || irqs_disabled()); EXTRACHECKS_WARN_ON((in_atomic() || in_interrupt() || irqs_disabled()) && !atomic);