public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: blzp1600: remove incorrect pf_match_ptr()
@ 2025-05-02 20:37 Arnd Bergmann
  2025-05-05 13:03 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2025-05-02 20:37 UTC (permalink / raw)
  To: James Cowgill, Matt Redfearn, Neil Jones, Nikolaos Pasaloukos,
	Linus Walleij, Bartosz Golaszewski
  Cc: Arnd Bergmann, linux-gpio, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The blzp1600_gpio_of_match is defined unconditionally and can always be referenced
by the driver, so don't use of_match_ptr() and avoid this warning:

drivers/gpio/gpio-blzp1600.c:263:34: error: 'blzp1600_gpio_of_match' defined but not used [-Werror=unused-const-variable=]
  263 | static const struct of_device_id blzp1600_gpio_of_match[] = {

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpio/gpio-blzp1600.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-blzp1600.c b/drivers/gpio/gpio-blzp1600.c
index 2760a13c0801..055cb296ae54 100644
--- a/drivers/gpio/gpio-blzp1600.c
+++ b/drivers/gpio/gpio-blzp1600.c
@@ -269,7 +269,7 @@ MODULE_DEVICE_TABLE(of, blzp1600_gpio_of_match);
 static struct platform_driver blzp1600_gpio_driver = {
 	.driver		= {
 		.name	= DRIVER_NAME,
-		.of_match_table = of_match_ptr(blzp1600_gpio_of_match),
+		.of_match_table = blzp1600_gpio_of_match,
 	},
 	.probe		= blzp1600_gpio_probe,
 };
-- 
2.39.5


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

* Re: [PATCH] gpio: blzp1600: remove incorrect pf_match_ptr()
  2025-05-02 20:37 [PATCH] gpio: blzp1600: remove incorrect pf_match_ptr() Arnd Bergmann
@ 2025-05-05 13:03 ` Bartosz Golaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2025-05-05 13:03 UTC (permalink / raw)
  To: James Cowgill, Matt Redfearn, Neil Jones, Nikolaos Pasaloukos,
	Linus Walleij, Bartosz Golaszewski, Arnd Bergmann
  Cc: Bartosz Golaszewski, Arnd Bergmann, linux-gpio, linux-kernel

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Fri, 02 May 2025 22:37:07 +0200, Arnd Bergmann wrote:
> The blzp1600_gpio_of_match is defined unconditionally and can always be referenced
> by the driver, so don't use of_match_ptr() and avoid this warning:
> 
> drivers/gpio/gpio-blzp1600.c:263:34: error: 'blzp1600_gpio_of_match' defined but not used [-Werror=unused-const-variable=]
>   263 | static const struct of_device_id blzp1600_gpio_of_match[] = {
> 
> 
> [...]

Applied, thanks!

[1/1] gpio: blzp1600: remove incorrect pf_match_ptr()
      https://git.kernel.org/brgl/linux/c/3a1e07184d78f52c07f69b40bedbbebbc417e71b

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

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

end of thread, other threads:[~2025-05-05 13:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-02 20:37 [PATCH] gpio: blzp1600: remove incorrect pf_match_ptr() Arnd Bergmann
2025-05-05 13:03 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox