All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <jbottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>
Subject: [PATCH] scsi_dh: Fix return value of scsi_dh_attach()
Date: Mon, 19 Dec 2011 13:05:46 +0100	[thread overview]
Message-ID: <1324296346-17876-1-git-send-email-hare@suse.de> (raw)

scsi_dh_attach() should return a standard error number on error.

Reported-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Hannes Reinecke <hare@suse.de>

diff --git a/include/scsi/scsi_dh.h b/include/scsi/scsi_dh.h
index e3f2db2..dfc2334 100644
--- a/include/scsi/scsi_dh.h
+++ b/include/scsi/scsi_dh.h
@@ -74,7 +74,7 @@ static inline int scsi_dh_handler_exist(const char *name)
 }
 static inline int scsi_dh_attach(struct request_queue *req, const char *name)
 {
-	return SCSI_DH_NOSYS;
+	return -EINVAL;
 }
 static inline void scsi_dh_detach(struct request_queue *q)
 {
@@ -82,6 +82,6 @@ static inline void scsi_dh_detach(struct request_queue *q)
 }
 static inline int scsi_dh_set_params(struct request_queue *req, const char *params)
 {
-	return -SCSI_DH_NOSYS;
+	return -EINVAL;
 }
 #endif

             reply	other threads:[~2011-12-19 12:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19 12:05 Hannes Reinecke [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-11-17 23:34 [PATCH] scsi_dh: Fix return value of scsi_dh_attach() Richard Weinberger
2011-12-18 14:43 ` Richard Weinberger
2011-12-18 14:45   ` James Bottomley
2011-12-18 14:53     ` Richard Weinberger
2011-12-19 11:59       ` Hannes Reinecke
2011-12-19 11:59         ` Hannes Reinecke
2011-12-19 12:40         ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1324296346-17876-1-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.