Subject: [PATCH] scsi: m68k 53c7xx codingstyle cleanups scsi: m68k 53c7xx codingstyle cleanups, as suggested by Christoph Hellwig Signed-off-by: Geert Uytterhoeven --- drivers/scsi/amiga7xx.c | 29 +++++++++++++++++------------ drivers/scsi/bvme6000_scsi.c | 20 ++++++++++++-------- drivers/scsi/mvme16x_scsi.c | 20 ++++++++++++-------- 3 files changed, 41 insertions(+), 28 deletions(-) --- a/drivers/scsi/amiga7xx.c +++ b/drivers/scsi/amiga7xx.c @@ -101,7 +101,6 @@ static int __devinit amiga7xx_init_one(s } hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); - if (hostdata == NULL) { printk(KERN_ERR "amiga7xx: Failed to allocate host data\n"); goto out_release; @@ -124,9 +123,11 @@ static int __devinit amiga7xx_init_one(s amiga7xx_scsi_driver_template.name = zdd->name; /* and register the chip */ - if ((host = NCR_700_detect(&amiga7xx_scsi_driver_template, hostdata, &z->dev)) - == NULL) { - printk(KERN_ERR "amiga7xx-scsi: No host detected; board configuration problem?\n"); + host = NCR_700_detect(&amiga7xx_scsi_driver_template, + hostdata, &z->dev); + if (!host) { + printk(KERN_ERR "amiga7xx-scsi: No host detected; " + "board configuration problem?\n"); goto out_free; } @@ -134,7 +135,8 @@ static int __devinit amiga7xx_init_one(s host->base = ioaddr; host->irq = IRQ_AMIGA_PORTS; - if (request_irq(host->irq, NCR_700_intr, IRQF_SHARED, "amiga7xx-scsi", host)) { + if (request_irq(host->irq, NCR_700_intr, IRQF_SHARED, + "amiga7xx-scsi", host)) { printk(KERN_ERR "amiga7xx-scsi: request_irq failed\n"); goto out_put_host; } @@ -188,7 +190,8 @@ static int __devinit a4000t_probe(struct if (!(MACH_IS_AMIGA && AMIGAHW_PRESENT(A4000_SCSI))) goto out; - if (!request_mem_region(A4000T_SCSI_ADDR, 0x1000, "A4000T builtin SCSI")) + if (!request_mem_region(A4000T_SCSI_ADDR, 0x1000, + "A4000T builtin SCSI")) goto out; hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); @@ -206,9 +209,10 @@ static int __devinit a4000t_probe(struct hostdata->dcntl_extra = EA_710; /* and register the chip */ - if ((host = NCR_700_detect(&amiga7xx_scsi_driver_template, hostdata, dev)) - == NULL) { - printk(KERN_ERR "a4000t-scsi: No host detected; board configuration problem?\n"); + host = NCR_700_detect(&amiga7xx_scsi_driver_template, hostdata, dev); + if (!host) { + printk(KERN_ERR "a4000t-scsi: No host detected; " + "board configuration problem?\n"); goto out_free; } @@ -262,11 +266,12 @@ static int __init amiga7xx_scsi_init(voi { int err; - if ((err = driver_register(&a4000t_scsi_driver))) + err = driver_register(&a4000t_scsi_driver); + if (err) return err; - a4000t_scsi_device = platform_device_register_simple("a4000t-scsi", -1, NULL, 0); - + a4000t_scsi_device = platform_device_register_simple("a4000t-scsi", + -1, NULL, 0); if (IS_ERR(a4000t_scsi_device)) { driver_unregister(&a4000t_scsi_driver); return PTR_ERR(a4000t_scsi_device); --- a/drivers/scsi/bvme6000_scsi.c +++ b/drivers/scsi/bvme6000_scsi.c @@ -44,7 +44,8 @@ bvme6000_probe(struct device *dev) hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); if (hostdata == NULL) { - printk(KERN_ERR "bvme6000-scsi: Failed to allocate host data\n"); + printk(KERN_ERR "bvme6000-scsi: " + "Failed to allocate host data\n"); goto out; } memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters)); @@ -58,15 +59,17 @@ bvme6000_probe(struct device *dev) hostdata->ctest7_extra = CTEST7_TT1; /* and register the chip */ - if ((host = NCR_700_detect(&bvme6000_scsi_driver_template, hostdata, dev)) - == NULL) { - printk(KERN_ERR "bvme6000-scsi: No host detected; board configuration problem?\n"); + host = NCR_700_detect(&bvme6000_scsi_driver_template, hostdata, dev); + if (!host) { + printk(KERN_ERR "bvme6000-scsi: No host detected; " + "board configuration problem?\n"); goto out_free; } host->base = BVME_NCR53C710_BASE; host->this_id = 7; host->irq = BVME_IRQ_SCSI; - if (request_irq(BVME_IRQ_SCSI, NCR_700_intr, 0, "bvme6000-scsi", host)) { + if (request_irq(BVME_IRQ_SCSI, NCR_700_intr, 0, "bvme6000-scsi", + host)) { printk(KERN_ERR "bvme6000-scsi: request_irq failed\n"); goto out_put_host; } @@ -109,11 +112,12 @@ static int __init bvme6000_scsi_init(voi { int err; - if ((err = driver_register(&bvme6000_scsi_driver))) + err = driver_register(&bvme6000_scsi_driver); + if (err) { return err; - bvme6000_scsi_device = platform_device_register_simple("bvme6000-scsi", -1, NULL, 0); - + bvme6000_scsi_device = platform_device_register_simple("bvme6000-scsi", + -1, NULL, 0); if (IS_ERR(bvme6000_scsi_device)) { driver_unregister(&bvme6000_scsi_driver); return PTR_ERR(bvme6000_scsi_device); --- a/drivers/scsi/mvme16x_scsi.c +++ b/drivers/scsi/mvme16x_scsi.c @@ -43,13 +43,15 @@ mvme16x_probe(struct device *dev) goto out; if (mvme16x_config & MVME16x_CONFIG_NO_SCSICHIP) { - printk(KERN_INFO "mvme16x-scsi: detection disabled, SCSI chip not present\n"); + printk(KERN_INFO "mvme16x-scsi: detection disabled, " + "SCSI chip not present\n"); goto out; } hostdata = kmalloc(sizeof(struct NCR_700_Host_Parameters), GFP_KERNEL); if (hostdata == NULL) { - printk(KERN_ERR "mvme16x-scsi: Failed to allocate host data\n"); + printk(KERN_ERR "mvme16x-scsi: " + "Failed to allocate host data\n"); goto out; } memset(hostdata, 0, sizeof(struct NCR_700_Host_Parameters)); @@ -63,9 +65,10 @@ mvme16x_probe(struct device *dev) hostdata->ctest7_extra = CTEST7_TT1; /* and register the chip */ - if ((host = NCR_700_detect(&mvme16x_scsi_driver_template, hostdata, dev)) - == NULL) { - printk(KERN_ERR "mvme16x-scsi: No host detected; board configuration problem?\n"); + host = NCR_700_detect(&mvme16x_scsi_driver_template, hostdata, dev); + if (!host) { + printk(KERN_ERR "mvme16x-scsi: No host detected; " + "board configuration problem?\n"); goto out_free; } host->this_id = 7; @@ -132,11 +135,12 @@ static int __init mvme16x_scsi_init(void { int err; - if ((err = driver_register(&mvme16x_scsi_driver))) + err = driver_register(&mvme16x_scsi_driver); + if (err) return err; - mvme16x_scsi_device = platform_device_register_simple("mvme16x-scsi", -1, NULL, 0); - + mvme16x_scsi_device = platform_device_register_simple("mvme16x-scsi", + -1, NULL, 0); if (IS_ERR(mvme16x_scsi_device)) { driver_unregister(&mvme16x_scsi_driver); return PTR_ERR(mvme16x_scsi_device);