All of lore.kernel.org
 help / color / mirror / Atom feed
* mark scsi_add_host __must_check
@ 2004-08-03  9:34 Arjan van de Ven
  0 siblings, 0 replies; only message in thread
From: Arjan van de Ven @ 2004-08-03  9:34 UTC (permalink / raw)
  To: linux-scsi

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 *);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-08-03  9:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-03  9:34 mark scsi_add_host __must_check Arjan van de Ven

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.