i2c: mux: remove incorrect of_match_ptr annotations
PATCH 1/1 i2c: mux: remove incorrect of_match_ptr annotations
From: Arnd Bergmann <[email protected]>
Building with W=1 shows a warning about ltc4306_of_match and i2c_mux_reg_of_match being unused when CONFIG_OF is disabled:
drivers/i2c/muxes/i2c-mux-ltc4306.c:200:34: error: unused variable 'ltc4306_of_match' [-Werror,-Wunused-const-variable]
drivers/i2c/muxes/i2c-mux-reg.c:242:34: error: unused variable 'i2c_mux_reg_of_match' [-Werror,-Wunused-const-variable]--- drivers/i2c/muxes/i2c-mux-ltc4306.c | 2 +- drivers/i2c/muxes/i2c-mux-reg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/muxes/i2c-mux-ltc4306.c +1 -1
@@ -303,7 +303,7 @@ static void ltc4306_remove(struct i2c_client *client)static struct i2c_driver ltc4306_driver = { .driver = { .name ="ltc4306" , - .of_match_table =of_match_ptr (ltc4306_of_match), + .of_match_table = ltc4306_of_match, }, .probe = ltc4306_probe, .remove = ltc4306_remove,
drivers/i2c/muxes/i2c-mux-reg.c +1 -1
@@ -250,7 +250,7 @@ static struct platform_driver i2c_mux_reg_driver = { .remove = i2c_mux_reg_remove, .driver = { .name = "i2c-mux-reg", - .of_match_table = of_match_ptr(i2c_mux_reg_of_match), + .of_match_table = i2c_mux_reg_of_match, }, };
Signature · 1 line
2.39.5
Quoted 20 lines
-----Original Message-----
From: Arnd Bergmann <[email protected]>
Sent: Tuesday, February 25, 2025 5:37 PM
To: Hennerich, Michael <[email protected]>; Peter Rosin <[email protected]>
Cc: Arnd Bergmann <[email protected]>; Rob Herring (Arm) <[email protected]>; Heiner Kallweit <[email protected]>; Thomas Zimmermann <[email protected]>; Laurent Pinchart <[email protected]>; Uwe Kleine König <u.kleine- [email protected]>; Andi Shyti <[email protected]>; linux- [email protected]; [email protected]
Subject: [PATCH] i2c: mux: remove incorrectof_match_ptrannotationsFrom: Arnd Bergmann <[email protected]>
Building with W=1 shows a warning about
ltc4306_of_matchandi2c_mux_reg_of_matchbeing unused whenCONFIG_OFis disabled:
Quoted 7 lines
drivers/i2c/muxes/i2c-mux-ltc4306.c:200:34: error: unused variable 'ltc4306_of_match' [-Werror,-Wunused-const-variable] drivers/i2c/muxes/i2c-mux-reg.c:242:34: error: unused variable'
i2c_mux_reg_of_match' [-Werror,-Wunused-const-variable]Acked-by Peter Rosin <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>
Quoted 34 lines
--- drivers/i2c/muxes/i2c-mux-ltc4306.c | 2 +- drivers/i2c/muxes/i2c-mux-reg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/i2c/muxes/i2c-mux- renamed from drivers/i2c/muxes/i2c-mux-ltc4306.c +0
-0
ltc4306.c
index19a7c370946d..8a87f19bf5d5100644drivers/i2c/muxes/i2c-mux-ltc4306.c +1
-1@@ -303,7 +303,7 @@ static void ltc4306_remove(struct i2c_client *client)static struct i2c_driver ltc4306_driver = { .driver = { .name ="ltc4306" , - .of_match_table =of_match_ptr (ltc4306_of_match), + .of_match_table = ltc4306_of_match, }, .probe = ltc4306_probe, .remove = ltc4306_remove,drivers/i2c/muxes/i2c-mux-reg.c +1
-2@@ -250,7 +250,7 @@ static struct platform_driver i2c_mux_reg_driver = { .remove = i2c_mux_reg_remove, .driver = { .name = "i2c-mux-reg", - .of_match_table = of_match_ptr(i2c_mux_reg_of_match), + .of_match_table = i2c_mux_reg_of_match, }, }; --2.39.5
Hi Arnd,
Quoted 10 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Building with W=1 shows a warning about
ltc4306_of_matchandi2c_mux_reg_of_matchbeing unused whenCONFIG_OFis disabled:drivers/i2c/muxes/i2c-mux-ltc4306.c:200:34: error: unused variable 'ltc4306_of_match' [-Werror,-Wunused-const-variable] drivers/i2c/muxes/i2c-mux-reg.c:242:34: error: unused variable 'i2c_mux_reg_of_match' [-Werror,-Wunused-const-variable]Acked-by Peter Rosin <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>
merged to i2c/i2c-host.
Thanks,
Andi