Commit 14485de431b0 ("usb: Use device_get_match_data()") dropped the
unconditional use of ci_hdrc_usb2_of_match resulting in this warning:
drivers/usb/chipidea/ci_hdrc_usb2.c:41:34: warning: unused variable 'ci_hdrc_usb2_of_match' [-Wunused-const-variable]
The fix is to drop of_match_ptr() which is not necessary because DT is
always used for this driver.
Fixes: 14485de431b0 ("usb: Use device_get_match_data()")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Rob Herring <[email protected]>
---
drivers/usb/chipidea/ci_hdrc_usb2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c
index 180a632dd7ba..97379f653b06 100644
--- a/drivers/usb/chipidea/ci_hdrc_usb2.c
+++ b/drivers/usb/chipidea/ci_hdrc_usb2.c
@@ -119,7 +119,7 @@ static struct platform_driver ci_hdrc_usb2_driver = {
.remove_new = ci_hdrc_usb2_remove,
.driver = {
.name = "chipidea-usb2",
- .of_match_table = of_match_ptr(ci_hdrc_usb2_of_match),
+ .of_match_table = ci_hdrc_usb2_of_match,
},
};
module_platform_driver(ci_hdrc_usb2_driver);
--
2.42.0
On 23-10-19 13:30:15, Rob Herring wrote:
> Commit 14485de431b0 ("usb: Use device_get_match_data()") dropped the
> unconditional use of ci_hdrc_usb2_of_match resulting in this warning:
>
> drivers/usb/chipidea/ci_hdrc_usb2.c:41:34: warning: unused variable 'ci_hdrc_usb2_of_match' [-Wunused-const-variable]
>
> The fix is to drop of_match_ptr() which is not necessary because DT is
> always used for this driver.
>
> Fixes: 14485de431b0 ("usb: Use device_get_match_data()")
> Reported-by: kernel test robot <[email protected]>
> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> Signed-off-by: Rob Herring <[email protected]>
Acked-by: Peter Chen <[email protected]>
> ---
> drivers/usb/chipidea/ci_hdrc_usb2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c
> index 180a632dd7ba..97379f653b06 100644
> --- a/drivers/usb/chipidea/ci_hdrc_usb2.c
> +++ b/drivers/usb/chipidea/ci_hdrc_usb2.c
> @@ -119,7 +119,7 @@ static struct platform_driver ci_hdrc_usb2_driver = {
> .remove_new = ci_hdrc_usb2_remove,
> .driver = {
> .name = "chipidea-usb2",
> - .of_match_table = of_match_ptr(ci_hdrc_usb2_of_match),
> + .of_match_table = ci_hdrc_usb2_of_match,
> },
> };
> module_platform_driver(ci_hdrc_usb2_driver);
> --
> 2.42.0
>
--
Thanks,
Peter Chen