linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] usb: host: xhci-rcar: drop of_match_ptr for ID table
@ 2023-03-11 17:36 Krzysztof Kozlowski
  2023-03-11 17:36 ` [PATCH 2/7] usb: host: max3421-hcd: " Krzysztof Kozlowski
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 17:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mathias Nyman, Richard Leitner, linux-usb,
	linux-kernel
  Cc: Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here).

  drivers/usb/host/xhci-rcar.c:269:34: error: ‘usb_xhci_of_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/usb/host/xhci-rcar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c
index 7f18509a1d39..b12c2c19d107 100644
--- a/drivers/usb/host/xhci-rcar.c
+++ b/drivers/usb/host/xhci-rcar.c
@@ -312,7 +312,7 @@ static struct platform_driver usb_xhci_renesas_driver = {
 	.driver	= {
 		.name = "xhci-renesas-hcd",
 		.pm = &xhci_plat_pm_ops,
-		.of_match_table = of_match_ptr(usb_xhci_of_match),
+		.of_match_table = usb_xhci_of_match,
 	},
 };
 module_platform_driver(usb_xhci_renesas_driver);
-- 
2.34.1


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

* [PATCH 2/7] usb: host: max3421-hcd: drop of_match_ptr for ID table
  2023-03-11 17:36 [PATCH 1/7] usb: host: xhci-rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
@ 2023-03-11 17:36 ` Krzysztof Kozlowski
  2023-03-11 17:36 ` [PATCH 3/7] usb: renesas_usbhs: " Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 17:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mathias Nyman, Richard Leitner, linux-usb,
	linux-kernel
  Cc: Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here).

  drivers/usb/host/max3421-hcd.c:1943:34: error: ‘max3421_of_match_table’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/usb/host/max3421-hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/max3421-hcd.c b/drivers/usb/host/max3421-hcd.c
index 28d1524ee2fa..d152d72de126 100644
--- a/drivers/usb/host/max3421-hcd.c
+++ b/drivers/usb/host/max3421-hcd.c
@@ -1951,7 +1951,7 @@ static struct spi_driver max3421_driver = {
 	.remove		= max3421_remove,
 	.driver		= {
 		.name	= "max3421-hcd",
-		.of_match_table = of_match_ptr(max3421_of_match_table),
+		.of_match_table = max3421_of_match_table,
 	},
 };
 
-- 
2.34.1


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

* [PATCH 3/7] usb: renesas_usbhs: drop of_match_ptr for ID table
  2023-03-11 17:36 [PATCH 1/7] usb: host: xhci-rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
  2023-03-11 17:36 ` [PATCH 2/7] usb: host: max3421-hcd: " Krzysztof Kozlowski
@ 2023-03-11 17:36 ` Krzysztof Kozlowski
  2023-03-11 17:36 ` [PATCH 4/7] usb: gadget: rzv2m_usb3drd: " Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 17:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mathias Nyman, Richard Leitner, linux-usb,
	linux-kernel
  Cc: Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here).

  drivers/usb/renesas_usbhs/common.c:535:34: error: ‘usbhs_of_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/usb/renesas_usbhs/common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 96f3939a65e2..fa34efabcccf 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -823,7 +823,7 @@ static struct platform_driver renesas_usbhs_driver = {
 	.driver		= {
 		.name	= "renesas_usbhs",
 		.pm	= &usbhsc_pm_ops,
-		.of_match_table = of_match_ptr(usbhs_of_match),
+		.of_match_table = usbhs_of_match,
 	},
 	.probe		= usbhs_probe,
 	.remove		= usbhs_remove,
-- 
2.34.1


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

* [PATCH 4/7] usb: gadget: rzv2m_usb3drd: drop of_match_ptr for ID table
  2023-03-11 17:36 [PATCH 1/7] usb: host: xhci-rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
  2023-03-11 17:36 ` [PATCH 2/7] usb: host: max3421-hcd: " Krzysztof Kozlowski
  2023-03-11 17:36 ` [PATCH 3/7] usb: renesas_usbhs: " Krzysztof Kozlowski
@ 2023-03-11 17:36 ` Krzysztof Kozlowski
  2023-03-11 17:36 ` [PATCH 5/7] usb: gadget: renesas_usb3: " Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 17:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mathias Nyman, Richard Leitner, linux-usb,
	linux-kernel
  Cc: Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here).

  drivers/usb/gadget/udc/rzv2m_usb3drd.c:120:34: error: ‘rzv2m_usb3drd_of_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/usb/gadget/udc/rzv2m_usb3drd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/rzv2m_usb3drd.c b/drivers/usb/gadget/udc/rzv2m_usb3drd.c
index 3c8bbf843038..8855d8e8d793 100644
--- a/drivers/usb/gadget/udc/rzv2m_usb3drd.c
+++ b/drivers/usb/gadget/udc/rzv2m_usb3drd.c
@@ -126,7 +126,7 @@ MODULE_DEVICE_TABLE(of, rzv2m_usb3drd_of_match);
 static struct platform_driver rzv2m_usb3drd_driver = {
 	.driver = {
 		.name = "rzv2m-usb3drd",
-		.of_match_table = of_match_ptr(rzv2m_usb3drd_of_match),
+		.of_match_table = rzv2m_usb3drd_of_match,
 	},
 	.probe = rzv2m_usb3drd_probe,
 	.remove = rzv2m_usb3drd_remove,
-- 
2.34.1


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

* [PATCH 5/7] usb: gadget: renesas_usb3: drop of_match_ptr for ID table
  2023-03-11 17:36 [PATCH 1/7] usb: host: xhci-rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2023-03-11 17:36 ` [PATCH 4/7] usb: gadget: rzv2m_usb3drd: " Krzysztof Kozlowski
@ 2023-03-11 17:36 ` Krzysztof Kozlowski
  2023-03-11 17:36 ` [PATCH 6/7] usb: gadget: max3420_udc: " Krzysztof Kozlowski
  2023-03-11 17:36 ` [PATCH 7/7] usb: misc: usb251xb: " Krzysztof Kozlowski
  5 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 17:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mathias Nyman, Richard Leitner, linux-usb,
	linux-kernel
  Cc: Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here).

  drivers/usb/gadget/udc/renesas_usb3.c:2811:34: error: ‘usb3_of_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/usb/gadget/udc/renesas_usb3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c
index bee6bceafc4f..24ff3bce68df 100644
--- a/drivers/usb/gadget/udc/renesas_usb3.c
+++ b/drivers/usb/gadget/udc/renesas_usb3.c
@@ -3039,7 +3039,7 @@ static struct platform_driver renesas_usb3_driver = {
 	.driver		= {
 		.name =	udc_name,
 		.pm		= &renesas_usb3_pm_ops,
-		.of_match_table = of_match_ptr(usb3_of_match),
+		.of_match_table = usb3_of_match,
 	},
 };
 module_platform_driver(renesas_usb3_driver);
-- 
2.34.1


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

* [PATCH 6/7] usb: gadget: max3420_udc: drop of_match_ptr for ID table
  2023-03-11 17:36 [PATCH 1/7] usb: host: xhci-rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2023-03-11 17:36 ` [PATCH 5/7] usb: gadget: renesas_usb3: " Krzysztof Kozlowski
@ 2023-03-11 17:36 ` Krzysztof Kozlowski
  2023-03-11 17:36 ` [PATCH 7/7] usb: misc: usb251xb: " Krzysztof Kozlowski
  5 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 17:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mathias Nyman, Richard Leitner, linux-usb,
	linux-kernel
  Cc: Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here).

  drivers/usb/gadget/udc/max3420_udc.c:1312:34: error: ‘max3420_udc_of_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/usb/gadget/udc/max3420_udc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/max3420_udc.c b/drivers/usb/gadget/udc/max3420_udc.c
index ddf0ed3eb4f2..12c519f32bf7 100644
--- a/drivers/usb/gadget/udc/max3420_udc.c
+++ b/drivers/usb/gadget/udc/max3420_udc.c
@@ -1319,7 +1319,7 @@ MODULE_DEVICE_TABLE(of, max3420_udc_of_match);
 static struct spi_driver max3420_driver = {
 	.driver = {
 		.name = "max3420-udc",
-		.of_match_table = of_match_ptr(max3420_udc_of_match),
+		.of_match_table = max3420_udc_of_match,
 	},
 	.probe = max3420_probe,
 	.remove = max3420_remove,
-- 
2.34.1


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

* [PATCH 7/7] usb: misc: usb251xb: drop of_match_ptr for ID table
  2023-03-11 17:36 [PATCH 1/7] usb: host: xhci-rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2023-03-11 17:36 ` [PATCH 6/7] usb: gadget: max3420_udc: " Krzysztof Kozlowski
@ 2023-03-11 17:36 ` Krzysztof Kozlowski
  2023-03-13  7:43   ` Richard Leitner
  5 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-11 17:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mathias Nyman, Richard Leitner, linux-usb,
	linux-kernel
  Cc: Krzysztof Kozlowski

The driver will match mostly by DT table (even thought there is regular
ID table) so there is little benefit in of_match_ptr (this also allows
ACPI matching via PRP0001, even though it might not be relevant here).

  drivers/usb/misc/usb251xb.c:223:35: error: ‘usb2517i_data’ defined but not used [-Werror=unused-const-variable=]
  drivers/usb/misc/usb251xb.c:215:35: error: ‘usb2517_data’ defined but not used [-Werror=unused-const-variable=]
  drivers/usb/misc/usb251xb.c:207:35: error: ‘usb2514bi_data’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/usb/misc/usb251xb.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index e3abe67a155d..c36e04aa5a82 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -377,7 +377,6 @@ static int usb251xb_connect(struct usb251xb *hub)
 	return err;
 }
 
-#ifdef CONFIG_OF
 static void usb251xb_get_ports_field(struct usb251xb *hub,
 				    const char *prop_name, u8 port_cnt,
 				    bool ds_only, u8 *fld)
@@ -626,13 +625,6 @@ static const struct of_device_id usb251xb_of_match[] = {
 	}
 };
 MODULE_DEVICE_TABLE(of, usb251xb_of_match);
-#else /* CONFIG_OF */
-static int usb251xb_get_ofdata(struct usb251xb *hub,
-			       const struct usb251xb_data *data)
-{
-	return 0;
-}
-#endif /* CONFIG_OF */
 
 static void usb251xb_regulator_disable_action(void *data)
 {
@@ -754,7 +746,7 @@ MODULE_DEVICE_TABLE(i2c, usb251xb_id);
 static struct i2c_driver usb251xb_i2c_driver = {
 	.driver = {
 		.name = DRIVER_NAME,
-		.of_match_table = of_match_ptr(usb251xb_of_match),
+		.of_match_table = usb251xb_of_match,
 		.pm = &usb251xb_pm_ops,
 	},
 	.probe_new = usb251xb_i2c_probe,
-- 
2.34.1


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

* Re: [PATCH 7/7] usb: misc: usb251xb: drop of_match_ptr for ID table
  2023-03-11 17:36 ` [PATCH 7/7] usb: misc: usb251xb: " Krzysztof Kozlowski
@ 2023-03-13  7:43   ` Richard Leitner
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Leitner @ 2023-03-13  7:43 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Greg Kroah-Hartman, Mathias Nyman, Richard Leitner, linux-usb,
	linux-kernel

On Sat, Mar 11, 2023 at 06:36:24PM +0100, Krzysztof Kozlowski wrote:
> The driver will match mostly by DT table (even thought there is regular
> ID table) so there is little benefit in of_match_ptr (this also allows
> ACPI matching via PRP0001, even though it might not be relevant here).
> 
>   drivers/usb/misc/usb251xb.c:223:35: error: ‘usb2517i_data’ defined but not used [-Werror=unused-const-variable=]
>   drivers/usb/misc/usb251xb.c:215:35: error: ‘usb2517_data’ defined but not used [-Werror=unused-const-variable=]
>   drivers/usb/misc/usb251xb.c:207:35: error: ‘usb2514bi_data’ defined but not used [-Werror=unused-const-variable=]
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thanks.

Acked-by: Richard Leitner <richard.leitner@skidata.com>

regards;rl


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

end of thread, other threads:[~2023-03-13  7:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-11 17:36 [PATCH 1/7] usb: host: xhci-rcar: drop of_match_ptr for ID table Krzysztof Kozlowski
2023-03-11 17:36 ` [PATCH 2/7] usb: host: max3421-hcd: " Krzysztof Kozlowski
2023-03-11 17:36 ` [PATCH 3/7] usb: renesas_usbhs: " Krzysztof Kozlowski
2023-03-11 17:36 ` [PATCH 4/7] usb: gadget: rzv2m_usb3drd: " Krzysztof Kozlowski
2023-03-11 17:36 ` [PATCH 5/7] usb: gadget: renesas_usb3: " Krzysztof Kozlowski
2023-03-11 17:36 ` [PATCH 6/7] usb: gadget: max3420_udc: " Krzysztof Kozlowski
2023-03-11 17:36 ` [PATCH 7/7] usb: misc: usb251xb: " Krzysztof Kozlowski
2023-03-13  7:43   ` Richard Leitner

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