Commit 83ef2ab4 authored by Martin K. Petersen's avatar Martin K. Petersen
Browse files

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: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parents 0e0a4da3 4a0166d5
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -295,7 +295,13 @@ static void __exit amiga_a3000_scsi_remove(struct platform_device *pdev)
	release_mem_region(res->start, resource_size(res));
}

static struct platform_driver amiga_a3000_scsi_driver = {
/*
 * amiga_a3000_scsi_remove() lives in .exit.text. For drivers registered via
 * module_platform_driver_probe() this is ok because they cannot get unbound at
 * runtime. So mark the driver struct with __refdata to prevent modpost
 * triggering a section mismatch warning.
 */
static struct platform_driver amiga_a3000_scsi_driver __refdata = {
	.remove_new = __exit_p(amiga_a3000_scsi_remove),
	.driver   = {
		.name	= "amiga-a3000-scsi",
+7 −1
Original line number Diff line number Diff line
@@ -108,7 +108,13 @@ static void __exit amiga_a4000t_scsi_remove(struct platform_device *pdev)
	release_mem_region(res->start, resource_size(res));
}

static struct platform_driver amiga_a4000t_scsi_driver = {
/*
 * amiga_a4000t_scsi_remove() lives in .exit.text. For drivers registered via
 * module_platform_driver_probe() this is ok because they cannot get unbound at
 * runtime. So mark the driver struct with __refdata to prevent modpost
 * triggering a section mismatch warning.
 */
static struct platform_driver amiga_a4000t_scsi_driver __refdata = {
	.remove_new = __exit_p(amiga_a4000t_scsi_remove),
	.driver   = {
		.name	= "amiga-a4000t-scsi",
+7 −1
Original line number Diff line number Diff line
@@ -878,7 +878,13 @@ static void __exit atari_scsi_remove(struct platform_device *pdev)
		atari_stram_free(atari_dma_buffer);
}

static struct platform_driver atari_scsi_driver = {
/*
 * atari_scsi_remove() lives in .exit.text. For drivers registered via
 * module_platform_driver_probe() this is ok because they cannot get unbound at
 * runtime. So mark the driver struct with __refdata to prevent modpost
 * triggering a section mismatch warning.
 */
static struct platform_driver atari_scsi_driver __refdata = {
	.remove_new = __exit_p(atari_scsi_remove),
	.driver = {
		.name	= DRV_MODULE_NAME,
+7 −1
Original line number Diff line number Diff line
@@ -534,7 +534,13 @@ static void __exit mac_scsi_remove(struct platform_device *pdev)
	scsi_host_put(instance);
}

static struct platform_driver mac_scsi_driver = {
/*
 * mac_scsi_remove() lives in .exit.text. For drivers registered via
 * module_platform_driver_probe() this is ok because they cannot get unbound at
 * runtime. So mark the driver struct with __refdata to prevent modpost
 * triggering a section mismatch warning.
 */
static struct platform_driver mac_scsi_driver __refdata = {
	.remove_new = __exit_p(mac_scsi_remove),
	.driver = {
		.name	= DRV_MODULE_NAME,