Message ID | 20200926212603.3889748-1-andrew@lunn.ch |
---|---|
State | New |
Headers | show |
Series | [net-next] net: marvell: mvpp2: Fix W=1 warning with !CONFIG_ACPI | expand |
> From: Andrew Lunn <andrew@lunn.ch> > Subject: [PATCH net-next] net: marvell: mvpp2: Fix W=1 warning with !CONFIG_ACPI > > Wrap the definition inside #ifdef/#endif. > > Compile tested only. > > Signed-off-by: Andrew Lunn <andrew@lunn.ch> Looks good, ACPI_PTR() should be NULL if !CONFIG_ACPI
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index d11d33cf3443..f6616c8933ca 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -7081,11 +7081,13 @@ static const struct of_device_id mvpp2_match[] = { }; MODULE_DEVICE_TABLE(of, mvpp2_match); +#ifdef CONFIG_ACPI static const struct acpi_device_id mvpp2_acpi_match[] = { { "MRVL0110", MVPP22 }, { }, }; MODULE_DEVICE_TABLE(acpi, mvpp2_acpi_match); +#endif static struct platform_driver mvpp2_driver = { .probe = mvpp2_probe,
rivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:7084:36: warning: ‘mvpp2_acpi_match’ defined but not used [-Wunused-const-variable=] 7084 | static const struct acpi_device_id mvpp2_acpi_match[] = { | ^~~~~~~~~~~~~~~~ Wrap the definition inside #ifdef/#endif. Compile tested only. Signed-off-by: Andrew Lunn <andrew@lunn.ch> --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 ++ 1 file changed, 2 insertions(+)