Skip to contentSkip to conversation

gpio: blzp1600: remove incorrect pf_match_ptr()

PATCH Applied Arnd Bergmann 2 participants 2 messages May 2, 2025 – May 5, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: blzp1600: remove incorrect pf_match_ptr()

From: Arnd Bergmann <[email protected]>

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[] = {

---
 drivers/gpio/gpio-blzp1600.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-blzp1600.c +1 -1
index 2760a13c0801..055cb296ae54 100644
@@ -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,
 };
Signature · 1 line
2.39.5
#1 lore raw

From: Bartosz Golaszewski <[email protected]>

Quoted 8 lines · Arnd Bergmann

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,

Signature · 1 line
Bartosz Golaszewski <[email protected]>