Justin P. Mattock wrote: > On 06/16/2010 08:34 AM, James Bottomley wrote: > > However, I don't think we should be ignoring the fact that the eh thread > > failed to spawn, so I think some type of printed warning (giving the > > error code) would be a much more appropriate replacement. > o.k. I'll give a try at that.. as a test I did this(below) seemed to > compile clean, but not sure if this is what you're asking for though: > diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c > index 6660fa9..8d98a46 100644 > --- a/drivers/scsi/hosts.c > +++ b/drivers/scsi/hosts.c > @@ -325,7 +325,6 @@ struct Scsi_Host *scsi_host_alloc(struct > scsi_host_template *sht, int privsize) > { > struct Scsi_Host *shost; > gfp_t gfp_mask = GFP_KERNEL; > - int rval; > > if (sht->unchecked_isa_dma && privsize) > gfp_mask |= __GFP_DMA; > @@ -420,7 +419,7 @@ struct Scsi_Host *scsi_host_alloc(struct > scsi_host_template *sht, int privsize) > shost->ehandler = kthread_run(scsi_error_handler, shost, > "scsi_eh_%d", shost->host_no); > if (IS_ERR(shost->ehandler)) { > - rval = PTR_ERR(shost->ehandler); > + printk(KERN_WARNING "test.....\n"); > goto fail_kfree; > } If you want to print anything here I think the error code would be a good thing to include as that could give a hint _what_ actually went wrong. In that case you would need rval, but IMHO it should be declared inside that if clause. Eike
Attachment:
signature.asc
Description: This is a digitally signed message part.