linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: chipidea: Fix unused ci_hdrc_usb2_of_match warning for !CONFIG_OF
@ 2023-10-19 18:30 Rob Herring
  2023-10-20  1:55 ` Peter Chen
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2023-10-19 18:30 UTC (permalink / raw)
  To: Peter Chen, Greg Kroah-Hartman; +Cc: kernel test robot, linux-usb, linux-kernel

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 <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310131627.M43j234A-lkp@intel.com/
Signed-off-by: Rob Herring <robh@kernel.org>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: chipidea: Fix unused ci_hdrc_usb2_of_match warning for !CONFIG_OF
  2023-10-19 18:30 [PATCH] usb: chipidea: Fix unused ci_hdrc_usb2_of_match warning for !CONFIG_OF Rob Herring
@ 2023-10-20  1:55 ` Peter Chen
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Chen @ 2023-10-20  1:55 UTC (permalink / raw)
  To: Rob Herring
  Cc: Greg Kroah-Hartman, kernel test robot, linux-usb, linux-kernel

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 <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202310131627.M43j234A-lkp@intel.com/
> Signed-off-by: Rob Herring <robh@kernel.org>

Acked-by: Peter Chen <peter.chen@kernel.org>

> ---
>  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-20  1:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-19 18:30 [PATCH] usb: chipidea: Fix unused ci_hdrc_usb2_of_match warning for !CONFIG_OF Rob Herring
2023-10-20  1:55 ` Peter Chen

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).