From: Arjan van de Ven <arjanv@redhat.com>
To: linux-scsi@vger.kernel.org
Subject: mark scsi_add_host __must_check
Date: Tue, 3 Aug 2004 11:34:19 +0200 [thread overview]
Message-ID: <20040803093419.GA28412@devserv.devel.redhat.com> (raw)
Hi,
it seems scsi_add_host() is one of those functions that a driver really has
to check the return value of, but several forget to do this. Patch below
marks it __must_check which will cause a warning in this case (with gcc
3.4 and later)..
--- linux-2.6.7/include/scsi/scsi_host.h~ 2004-08-03 11:33:19.127693290 +0200
+++ linux-2.6.7/include/scsi/scsi_host.h 2004-08-03 11:33:19.127693290 +0200
@@ -524,7 +524,7 @@
container_of(d, struct Scsi_Host, shost_classdev)
extern struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *, int);
-extern int scsi_add_host(struct Scsi_Host *, struct device *);
+extern int __must_check scsi_add_host(struct Scsi_Host *, struct device *);
extern void scsi_scan_host(struct Scsi_Host *);
extern void scsi_remove_host(struct Scsi_Host *);
extern struct Scsi_Host *scsi_host_get(struct Scsi_Host *);
reply other threads:[~2004-08-03 9:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20040803093419.GA28412@devserv.devel.redhat.com \
--to=arjanv@redhat.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.