* [PATCH 1/1] mfd: khadas-mcu: Fix randconfig 'unused-const-variable' warning
@ 2020-08-28 8:50 Lee Jones
2020-08-28 9:19 ` Neil Armstrong
0 siblings, 1 reply; 2+ messages in thread
From: Lee Jones @ 2020-08-28 8:50 UTC (permalink / raw)
To: lee.jones
Cc: linux-amlogic, kernel test robot, linux-kernel, linux-arm-kernel,
Neil Armstrong
When testing with !OF, the build system reports:
>> drivers/mfd/khadas-mcu.c:125:34: warning: unused variable 'khadas_mcu_of_match' [-Wunused-const-variable]
static const struct of_device_id khadas_mcu_of_match[] = {
^
Cc: Neil Armstrong <narmstrong@baylibre.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/mfd/khadas-mcu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/khadas-mcu.c b/drivers/mfd/khadas-mcu.c
index 44d5bb462daba..f3d418810693c 100644
--- a/drivers/mfd/khadas-mcu.c
+++ b/drivers/mfd/khadas-mcu.c
@@ -122,11 +122,13 @@ static int khadas_mcu_probe(struct i2c_client *client,
return 0;
}
+#ifdef CONFIG_OF
static const struct of_device_id khadas_mcu_of_match[] = {
{ .compatible = "khadas,mcu", },
{},
};
MODULE_DEVICE_TABLE(of, khadas_mcu_of_match);
+#endif
static struct i2c_driver khadas_mcu_driver = {
.driver = {
--
2.25.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] mfd: khadas-mcu: Fix randconfig 'unused-const-variable' warning
2020-08-28 8:50 [PATCH 1/1] mfd: khadas-mcu: Fix randconfig 'unused-const-variable' warning Lee Jones
@ 2020-08-28 9:19 ` Neil Armstrong
0 siblings, 0 replies; 2+ messages in thread
From: Neil Armstrong @ 2020-08-28 9:19 UTC (permalink / raw)
To: Lee Jones
Cc: linux-amlogic, linux-kernel, linux-arm-kernel, kernel test robot
Hi Lee,
On 28/08/2020 10:50, Lee Jones wrote:
> When testing with !OF, the build system reports:
>
>>> drivers/mfd/khadas-mcu.c:125:34: warning: unused variable 'khadas_mcu_of_match' [-Wunused-const-variable]
> static const struct of_device_id khadas_mcu_of_match[] = {
> ^
>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> drivers/mfd/khadas-mcu.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mfd/khadas-mcu.c b/drivers/mfd/khadas-mcu.c
> index 44d5bb462daba..f3d418810693c 100644
> --- a/drivers/mfd/khadas-mcu.c
> +++ b/drivers/mfd/khadas-mcu.c
> @@ -122,11 +122,13 @@ static int khadas_mcu_probe(struct i2c_client *client,
> return 0;
> }
>
> +#ifdef CONFIG_OF
> static const struct of_device_id khadas_mcu_of_match[] = {
> { .compatible = "khadas,mcu", },
> {},
> };
> MODULE_DEVICE_TABLE(of, khadas_mcu_of_match);
> +#endif
>
> static struct i2c_driver khadas_mcu_driver = {
> .driver = {
>
Thanks for the patch,
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-28 9:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 8:50 [PATCH 1/1] mfd: khadas-mcu: Fix randconfig 'unused-const-variable' warning Lee Jones
2020-08-28 9:19 ` Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).