Skip to contentSkip to conversation

i2c-mux-reg: fix compilation warnings

PATCH Applied Mike Rapoport 2 participants 2 messages Sep 2, 2015 – Sep 3, 2015 1 message not in the archive

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

PATCH 1/1 i2c-mux-reg: fix compilation warnings

With CONFIG_OF=n, the following warnings occur when compiling drivers/i2c/muxes/i2c-mux-reg.c:

CC drivers/i2c/muxes/i2c-mux-reg.o
drivers/i2c/muxes/i2c-mux-reg.c:170:13: warning: ‘struct gpiomux’ declared inside parameter list [enabled by default]
struct platform_device *pdev)
^
drivers/i2c/muxes/i2c-mux-reg.c:170:13: warning: its scope
is only this definition or declaration, which is probably not what you want [enabled by default] drivers/i2c/muxes/i2c-mux-reg.c: In function ‘i2c_mux_reg_probe’:
drivers/i2c/muxes/i2c-mux-reg.c:201:3: warning: passing argument 1 of ‘i2c_mux_reg_probe_dt’ from incompatible pointer type [enabled by default]
ret = i2c_mux_reg_probe_dt(mux, pdev);
^

---
 drivers/i2c/muxes/i2c-mux-reg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/muxes/i2c-mux-reg.c +1 -1
index 86d41d36..cff1519 100644
@@ -166,7 +166,7 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux,
 	return 0;
 }
 #else
-static int i2c_mux_reg_probe_dt(struct gpiomux *mux,
+static int i2c_mux_reg_probe_dt(struct regmux *mux,
 					struct platform_device *pdev)
 {
 	return 0;
Signature · 1 line
1.8.3.1
Applied
#2 lore raw
In reply to a message not in the archive
Quoted 11 lines · Mike Rapoport

With CONFIG_OF=n, the following warnings occur when compiling drivers/i2c/muxes/i2c-mux-reg.c:

CC drivers/i2c/muxes/i2c-mux-reg.o
drivers/i2c/muxes/i2c-mux-reg.c:170:13: warning: ‘struct gpiomux’ declared inside parameter list [enabled by default]
struct platform_device *pdev)
^
drivers/i2c/muxes/i2c-mux-reg.c:170:13: warning: its scope
is only this definition or declaration, which is probably not what you want [enabled by default] drivers/i2c/muxes/i2c-mux-reg.c: In function ‘i2c_mux_reg_probe’:
drivers/i2c/muxes/i2c-mux-reg.c:201:3: warning: passing argument 1 of ‘i2c_mux_reg_probe_dt’ from incompatible pointer type [enabled by default]

Quoted 4 lines
   ret = i2c_mux_reg_probe_dt(mux, pdev);
   ^

Applied to for-next, thanks!