mark scsi_add_host __must_check
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)..
include/scsi/scsi_host.h renamed from include/scsi/scsi_host.h~ +1 -1
@@ -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 *);