From 26f48528427e63f1bf15c1592e7c0e12695069a5 Mon Sep 17 00:00:00 2001 From: Daniel Scheller Date: Mon, 10 Jul 2017 20:12:07 +0200 Subject: [PATCH] octonet: add __refdata annotation to "struct platform_driver octonet_driver {...}" fixes section mismatch warning during compile $ make CONFIG_DEBUG_SECTION_MISMATCH=y -j3 [...] MODPOST 16 modules WARNING: ddbridge/octonet.o(.data+0x0): Section mismatch in reference from the variable octonet_driver to the function .init.text:octonet_probe() The variable octonet_driver references the function __init octonet_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console --- ddbridge/octonet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddbridge/octonet.c b/ddbridge/octonet.c index fd686c6..dbea15b 100644 --- a/ddbridge/octonet.c +++ b/ddbridge/octonet.c @@ -217,7 +217,7 @@ static const struct of_device_id octonet_dt_ids[] = { MODULE_DEVICE_TABLE(of, octonet_dt_ids); #endif -static struct platform_driver octonet_driver = { +static struct platform_driver __refdata octonet_driver = { .remove = __exit_p(octonet_remove), .probe = octonet_probe, .driver = {