Skip to content

Commit e78e59a

Browse files
Merge patch series "scsi: Convert to platform remove callback returning" void
Uwe Kleine-König <[email protected]> says: Hello, this series converts all drivers below drivers/scsi to struct platform_driver::remove_new(). See commit 5c5a768 ("platform: Provide a remove callback that returns no value") for an extended explanation and the eventual goal. All conversations are trivial, because all .remove() callbacks returned zero unconditionally. Best regards Uwe Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
2 parents e84d343 + 6ff482e commit e78e59a

File tree

14 files changed

+28
-50
lines changed

14 files changed

+28
-50
lines changed

drivers/scsi/a3000.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static int __init amiga_a3000_scsi_probe(struct platform_device *pdev)
282282
return error;
283283
}
284284

285-
static int __exit amiga_a3000_scsi_remove(struct platform_device *pdev)
285+
static void __exit amiga_a3000_scsi_remove(struct platform_device *pdev)
286286
{
287287
struct Scsi_Host *instance = platform_get_drvdata(pdev);
288288
struct a3000_hostdata *hdata = shost_priv(instance);
@@ -293,11 +293,10 @@ static int __exit amiga_a3000_scsi_remove(struct platform_device *pdev)
293293
free_irq(IRQ_AMIGA_PORTS, instance);
294294
scsi_host_put(instance);
295295
release_mem_region(res->start, resource_size(res));
296-
return 0;
297296
}
298297

299298
static struct platform_driver amiga_a3000_scsi_driver = {
300-
.remove = __exit_p(amiga_a3000_scsi_remove),
299+
.remove_new = __exit_p(amiga_a3000_scsi_remove),
301300
.driver = {
302301
.name = "amiga-a3000-scsi",
303302
},

drivers/scsi/a4000t.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static int __init amiga_a4000t_scsi_probe(struct platform_device *pdev)
9595
return -ENODEV;
9696
}
9797

98-
static int __exit amiga_a4000t_scsi_remove(struct platform_device *pdev)
98+
static void __exit amiga_a4000t_scsi_remove(struct platform_device *pdev)
9999
{
100100
struct Scsi_Host *host = platform_get_drvdata(pdev);
101101
struct NCR_700_Host_Parameters *hostdata = shost_priv(host);
@@ -106,11 +106,10 @@ static int __exit amiga_a4000t_scsi_remove(struct platform_device *pdev)
106106
kfree(hostdata);
107107
free_irq(host->irq, host);
108108
release_mem_region(res->start, resource_size(res));
109-
return 0;
110109
}
111110

112111
static struct platform_driver amiga_a4000t_scsi_driver = {
113-
.remove = __exit_p(amiga_a4000t_scsi_remove),
112+
.remove_new = __exit_p(amiga_a4000t_scsi_remove),
114113
.driver = {
115114
.name = "amiga-a4000t-scsi",
116115
},

drivers/scsi/atari_scsi.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ static int __init atari_scsi_probe(struct platform_device *pdev)
865865
return error;
866866
}
867867

868-
static int __exit atari_scsi_remove(struct platform_device *pdev)
868+
static void __exit atari_scsi_remove(struct platform_device *pdev)
869869
{
870870
struct Scsi_Host *instance = platform_get_drvdata(pdev);
871871

@@ -876,11 +876,10 @@ static int __exit atari_scsi_remove(struct platform_device *pdev)
876876
scsi_host_put(instance);
877877
if (atari_dma_buffer)
878878
atari_stram_free(atari_dma_buffer);
879-
return 0;
880879
}
881880

882881
static struct platform_driver atari_scsi_driver = {
883-
.remove = __exit_p(atari_scsi_remove),
882+
.remove_new = __exit_p(atari_scsi_remove),
884883
.driver = {
885884
.name = DRV_MODULE_NAME,
886885
},

drivers/scsi/bvme6000_scsi.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ bvme6000_probe(struct platform_device *dev)
8989
return -ENODEV;
9090
}
9191

92-
static int
92+
static void
9393
bvme6000_device_remove(struct platform_device *dev)
9494
{
9595
struct Scsi_Host *host = platform_get_drvdata(dev);
@@ -99,16 +99,14 @@ bvme6000_device_remove(struct platform_device *dev)
9999
NCR_700_release(host);
100100
kfree(hostdata);
101101
free_irq(host->irq, host);
102-
103-
return 0;
104102
}
105103

106104
static struct platform_driver bvme6000_scsi_driver = {
107105
.driver = {
108106
.name = "bvme6000-scsi",
109107
},
110108
.probe = bvme6000_probe,
111-
.remove = bvme6000_device_remove,
109+
.remove_new = bvme6000_device_remove,
112110
};
113111

114112
static int __init bvme6000_scsi_init(void)

drivers/scsi/jazz_esp.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static int esp_jazz_probe(struct platform_device *dev)
176176
return err;
177177
}
178178

179-
static int esp_jazz_remove(struct platform_device *dev)
179+
static void esp_jazz_remove(struct platform_device *dev)
180180
{
181181
struct esp *esp = dev_get_drvdata(&dev->dev);
182182
unsigned int irq = esp->host->irq;
@@ -189,16 +189,14 @@ static int esp_jazz_remove(struct platform_device *dev)
189189
esp->command_block_dma);
190190

191191
scsi_host_put(esp->host);
192-
193-
return 0;
194192
}
195193

196194
/* work with hotplug and coldplug */
197195
MODULE_ALIAS("platform:jazz_esp");
198196

199197
static struct platform_driver esp_jazz_driver = {
200198
.probe = esp_jazz_probe,
201-
.remove = esp_jazz_remove,
199+
.remove_new = esp_jazz_remove,
202200
.driver = {
203201
.name = "jazz_esp",
204202
},

drivers/scsi/mac_esp.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ static int esp_mac_probe(struct platform_device *dev)
407407
return err;
408408
}
409409

410-
static int esp_mac_remove(struct platform_device *dev)
410+
static void esp_mac_remove(struct platform_device *dev)
411411
{
412412
struct mac_esp_priv *mep = platform_get_drvdata(dev);
413413
struct esp *esp = mep->esp;
@@ -428,13 +428,11 @@ static int esp_mac_remove(struct platform_device *dev)
428428
kfree(esp->command_block);
429429

430430
scsi_host_put(esp->host);
431-
432-
return 0;
433431
}
434432

435433
static struct platform_driver esp_mac_driver = {
436434
.probe = esp_mac_probe,
437-
.remove = esp_mac_remove,
435+
.remove_new = esp_mac_remove,
438436
.driver = {
439437
.name = DRV_MODULE_NAME,
440438
},

drivers/scsi/mac_scsi.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ static int __init mac_scsi_probe(struct platform_device *pdev)
523523
return error;
524524
}
525525

526-
static int __exit mac_scsi_remove(struct platform_device *pdev)
526+
static void __exit mac_scsi_remove(struct platform_device *pdev)
527527
{
528528
struct Scsi_Host *instance = platform_get_drvdata(pdev);
529529

@@ -532,11 +532,10 @@ static int __exit mac_scsi_remove(struct platform_device *pdev)
532532
free_irq(instance->irq, instance);
533533
NCR5380_exit(instance);
534534
scsi_host_put(instance);
535-
return 0;
536535
}
537536

538537
static struct platform_driver mac_scsi_driver = {
539-
.remove = __exit_p(mac_scsi_remove),
538+
.remove_new = __exit_p(mac_scsi_remove),
540539
.driver = {
541540
.name = DRV_MODULE_NAME,
542541
},

drivers/scsi/mvme16x_scsi.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static int mvme16x_probe(struct platform_device *dev)
103103
return -ENODEV;
104104
}
105105

106-
static int mvme16x_device_remove(struct platform_device *dev)
106+
static void mvme16x_device_remove(struct platform_device *dev)
107107
{
108108
struct Scsi_Host *host = platform_get_drvdata(dev);
109109
struct NCR_700_Host_Parameters *hostdata = shost_priv(host);
@@ -120,16 +120,14 @@ static int mvme16x_device_remove(struct platform_device *dev)
120120
NCR_700_release(host);
121121
kfree(hostdata);
122122
free_irq(host->irq, host);
123-
124-
return 0;
125123
}
126124

127125
static struct platform_driver mvme16x_scsi_driver = {
128126
.driver = {
129127
.name = "mvme16x-scsi",
130128
},
131129
.probe = mvme16x_probe,
132-
.remove = mvme16x_device_remove,
130+
.remove_new = mvme16x_device_remove,
133131
};
134132

135133
static int __init mvme16x_scsi_init(void)

drivers/scsi/qlogicpti.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ static int qpti_sbus_probe(struct platform_device *op)
14091409
return -ENODEV;
14101410
}
14111411

1412-
static int qpti_sbus_remove(struct platform_device *op)
1412+
static void qpti_sbus_remove(struct platform_device *op)
14131413
{
14141414
struct qlogicpti *qpti = dev_get_drvdata(&op->dev);
14151415

@@ -1438,8 +1438,6 @@ static int qpti_sbus_remove(struct platform_device *op)
14381438
of_iounmap(&op->resource[0], qpti->sreg, sizeof(unsigned char));
14391439

14401440
scsi_host_put(qpti->qhost);
1441-
1442-
return 0;
14431441
}
14441442

14451443
static const struct of_device_id qpti_match[] = {
@@ -1465,7 +1463,7 @@ static struct platform_driver qpti_sbus_driver = {
14651463
.of_match_table = qpti_match,
14661464
},
14671465
.probe = qpti_sbus_probe,
1468-
.remove = qpti_sbus_remove,
1466+
.remove_new = qpti_sbus_remove,
14691467
};
14701468
module_platform_driver(qpti_sbus_driver);
14711469

drivers/scsi/sgiwd93.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static int sgiwd93_probe(struct platform_device *pdev)
291291
return err;
292292
}
293293

294-
static int sgiwd93_remove(struct platform_device *pdev)
294+
static void sgiwd93_remove(struct platform_device *pdev)
295295
{
296296
struct Scsi_Host *host = platform_get_drvdata(pdev);
297297
struct ip22_hostdata *hdata = (struct ip22_hostdata *) host->hostdata;
@@ -302,12 +302,11 @@ static int sgiwd93_remove(struct platform_device *pdev)
302302
dma_free_noncoherent(&pdev->dev, HPC_DMA_SIZE, hdata->cpu, hdata->dma,
303303
DMA_TO_DEVICE);
304304
scsi_host_put(host);
305-
return 0;
306305
}
307306

308307
static struct platform_driver sgiwd93_driver = {
309308
.probe = sgiwd93_probe,
310-
.remove = sgiwd93_remove,
309+
.remove_new = sgiwd93_remove,
311310
.driver = {
312311
.name = "sgiwd93",
313312
}

0 commit comments

Comments
 (0)