diff mbox series

[3/3] mmc: sunxi: drop of_match_ptr from of_device_id table

Message ID 20201026153810.89512-3-krzk@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/3] mmc: s3cmci: include GPIO descriptor consumer header | expand

Commit Message

Krzysztof Kozlowski Oct. 26, 2020, 3:38 p.m. UTC
The driver can match only via DT table so it should be always used and
the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it is not relevant for sunxi).  This
fixes compile warning:

    drivers/mmc/host/sunxi-mmc.c:1181:34: warning: ‘sunxi_mmc_of_match’ defined but not used [-Wunused-const-variable=]

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/mmc/host/sunxi-mmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Maxime Ripard Oct. 26, 2020, 5:20 p.m. UTC | #1
On Mon, Oct 26, 2020 at 04:38:10PM +0100, Krzysztof Kozlowski wrote:
> The driver can match only via DT table so it should be always used and
> the of_match_ptr does not have any sense (this also allows ACPI
> matching via PRP0001, even though it is not relevant for sunxi).  This
> fixes compile warning:
> 
>     drivers/mmc/host/sunxi-mmc.c:1181:34: warning: ‘sunxi_mmc_of_match’ defined but not used [-Wunused-const-variable=]
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Acked-by: Maxime Ripard <mripard@kernel.org>

Maxime
Ulf Hansson Oct. 27, 2020, 1:41 p.m. UTC | #2
On Mon, 26 Oct 2020 at 16:40, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> The driver can match only via DT table so it should be always used and
> the of_match_ptr does not have any sense (this also allows ACPI
> matching via PRP0001, even though it is not relevant for sunxi).  This
> fixes compile warning:
>
>     drivers/mmc/host/sunxi-mmc.c:1181:34: warning: ‘sunxi_mmc_of_match’ defined but not used [-Wunused-const-variable=]
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sunxi-mmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index fc62773602ec..6310693f2ac0 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -26,6 +26,7 @@
>  #include <linux/mmc/sdio.h>
>  #include <linux/mmc/slot-gpio.h>
>  #include <linux/module.h>
> +#include <linux/mod_devicetable.h>
>  #include <linux/of_address.h>
>  #include <linux/of_platform.h>
>  #include <linux/platform_device.h>
> @@ -1515,7 +1516,7 @@ static struct platform_driver sunxi_mmc_driver = {
>         .driver = {
>                 .name   = "sunxi-mmc",
>                 .probe_type = PROBE_PREFER_ASYNCHRONOUS,
> -               .of_match_table = of_match_ptr(sunxi_mmc_of_match),
> +               .of_match_table = sunxi_mmc_of_match,
>                 .pm = &sunxi_mmc_pm_ops,
>         },
>         .probe          = sunxi_mmc_probe,
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index fc62773602ec..6310693f2ac0 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -26,6 +26,7 @@ 
 #include <linux/mmc/sdio.h>
 #include <linux/mmc/slot-gpio.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
@@ -1515,7 +1516,7 @@  static struct platform_driver sunxi_mmc_driver = {
 	.driver = {
 		.name	= "sunxi-mmc",
 		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
-		.of_match_table = of_match_ptr(sunxi_mmc_of_match),
+		.of_match_table = sunxi_mmc_of_match,
 		.pm = &sunxi_mmc_pm_ops,
 	},
 	.probe		= sunxi_mmc_probe,