Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge patch series "scsi: Prevent several section mismatch warnings"

Uwe Kleine-König <u.kleine-koenig@pengutronix.de> says:

Hello,

this series fixes the same issue in four drivers. The warning is a false
positive and to suppress it the driver structs are marked with
__refdata and a comment is added to describe the (non-trivial)
situation.

Best regards
Uwe

Link: https://lore.kernel.org/r/cover.1711746359.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

+28 -4
+7 -1
drivers/scsi/a3000.c
··· 295 295 release_mem_region(res->start, resource_size(res)); 296 296 } 297 297 298 - static struct platform_driver amiga_a3000_scsi_driver = { 298 + /* 299 + * amiga_a3000_scsi_remove() lives in .exit.text. For drivers registered via 300 + * module_platform_driver_probe() this is ok because they cannot get unbound at 301 + * runtime. So mark the driver struct with __refdata to prevent modpost 302 + * triggering a section mismatch warning. 303 + */ 304 + static struct platform_driver amiga_a3000_scsi_driver __refdata = { 299 305 .remove_new = __exit_p(amiga_a3000_scsi_remove), 300 306 .driver = { 301 307 .name = "amiga-a3000-scsi",
+7 -1
drivers/scsi/a4000t.c
··· 108 108 release_mem_region(res->start, resource_size(res)); 109 109 } 110 110 111 - static struct platform_driver amiga_a4000t_scsi_driver = { 111 + /* 112 + * amiga_a4000t_scsi_remove() lives in .exit.text. For drivers registered via 113 + * module_platform_driver_probe() this is ok because they cannot get unbound at 114 + * runtime. So mark the driver struct with __refdata to prevent modpost 115 + * triggering a section mismatch warning. 116 + */ 117 + static struct platform_driver amiga_a4000t_scsi_driver __refdata = { 112 118 .remove_new = __exit_p(amiga_a4000t_scsi_remove), 113 119 .driver = { 114 120 .name = "amiga-a4000t-scsi",
+7 -1
drivers/scsi/atari_scsi.c
··· 878 878 atari_stram_free(atari_dma_buffer); 879 879 } 880 880 881 - static struct platform_driver atari_scsi_driver = { 881 + /* 882 + * atari_scsi_remove() lives in .exit.text. For drivers registered via 883 + * module_platform_driver_probe() this is ok because they cannot get unbound at 884 + * runtime. So mark the driver struct with __refdata to prevent modpost 885 + * triggering a section mismatch warning. 886 + */ 887 + static struct platform_driver atari_scsi_driver __refdata = { 882 888 .remove_new = __exit_p(atari_scsi_remove), 883 889 .driver = { 884 890 .name = DRV_MODULE_NAME,
+7 -1
drivers/scsi/mac_scsi.c
··· 534 534 scsi_host_put(instance); 535 535 } 536 536 537 - static struct platform_driver mac_scsi_driver = { 537 + /* 538 + * mac_scsi_remove() lives in .exit.text. For drivers registered via 539 + * module_platform_driver_probe() this is ok because they cannot get unbound at 540 + * runtime. So mark the driver struct with __refdata to prevent modpost 541 + * triggering a section mismatch warning. 542 + */ 543 + static struct platform_driver mac_scsi_driver __refdata = { 538 544 .remove_new = __exit_p(mac_scsi_remove), 539 545 .driver = { 540 546 .name = DRV_MODULE_NAME,