Skip to contentSkip to conversation

horus3a: fix horus3a_attach inline wrapper

PATCH In review Arnd Bergmann 2 participants 2 messages Oct 16, 2015

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

PATCH 1/1 horus3a: fix horus3a_attach inline wrapper

The 'static inline' version of horus3a_attach() is incorrectly copied from another file, which results in a build error when CONFIG_DVB_HORUS3A is disabled:

In file included from /git/arm-soc/drivers/media/pci/netup_unidvb/netup_unidvb_core.c:34:0:
media/dvb-frontends/horus3a.h:51:13: warning: 'struct cxd2820r_config' declared inside parameter list media/dvb-frontends/horus3a.h:51:13: warning: its scope is only this definition or declaration, which is probably not what you want media/pci/netup_unidvb/netup_unidvb_core.c: In function 'netup_unidvb_dvb_init':
media/pci/netup_unidvb/netup_unidvb_core.c:417:279: warning: passing argument 1 of '__a' from incompatible pointer type [-Wincompatible-pointer-types] media/pci/netup_unidvb/netup_unidvb_core.c:417:279: note: expected 'const struct cxd2820r_config *' but argument is of type 'struct dvb_frontend *' media/pci/netup_unidvb/netup_unidvb_core.c:417:298: warning: passing argument 2 of '__a' from incompatible pointer type [-Wincompatible-pointer-types] media/pci/netup_unidvb/netup_unidvb_core.c:417:298: note: expected 'struct i2c_adapter *' but argument is of type 'struct horus3a_config *' media/pci/netup_unidvb/netup_unidvb_core.c:417:275: error: too many arguments to function '__a'

This changes the code to have the correct prototype.

Fixes a5d32b358254 ("[media] horus3a: Sony Horus3A DVB-S/S2 tuner driver")

---
Found on ARM randconfig builds

drivers/media/dvb-frontends/horus3a.h +2 -2
index b055319d532e..c1e2d1834b78 100644
@@ -46,8 +46,8 @@ extern struct dvb_frontend *horus3a_attach(struct dvb_frontend *fe,
 					const struct horus3a_config *config,
 					struct i2c_adapter *i2c);
 #else
-static inline struct dvb_frontend *horus3a_attach(
-					const struct cxd2820r_config *config,
+static inline struct dvb_frontend *horus3a_attach(struct dvb_frontend *fe,
+					const struct horus3a_config *config,
 					struct i2c_adapter *i2c)
 {
 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
#1 lore raw

Hello Arnd,

Quoted 14 lines · Arnd Bergmann

The 'static inline' version of horus3a_attach() is incorrectly copied from another file, which results in a build error when CONFIG_DVB_HORUS3A is disabled:

In file included from /git/arm-soc/drivers/media/pci/netup_unidvb/netup_unidvb_core.c:34:0:
media/dvb-frontends/horus3a.h:51:13: warning: 'struct cxd2820r_config' declared inside parameter list media/dvb-frontends/horus3a.h:51:13: warning: its scope is only this definition or declaration, which is probably not what you want media/pci/netup_unidvb/netup_unidvb_core.c: In function 'netup_unidvb_dvb_init':
media/pci/netup_unidvb/netup_unidvb_core.c:417:279: warning: passing argument 1 of '__a' from incompatible pointer type [-Wincompatible-pointer-types] media/pci/netup_unidvb/netup_unidvb_core.c:417:279: note: expected 'const struct cxd2820r_config *' but argument is of type 'struct dvb_frontend *' media/pci/netup_unidvb/netup_unidvb_core.c:417:298: warning: passing argument 2 of '__a' from incompatible pointer type [-Wincompatible-pointer-types] media/pci/netup_unidvb/netup_unidvb_core.c:417:298: note: expected 'struct i2c_adapter *' but argument is of type 'struct horus3a_config *' media/pci/netup_unidvb/netup_unidvb_core.c:417:275: error: too many arguments to function '__a'

Quoted 5 lines

This changes the code to have the correct prototype.

Fixes a5d32b358254 ("[media] horus3a: Sony Horus3A DVB-S/S2 tuner driver")

---

I posted the same patch a couple of weeks ago and was already picked by Mauro on his fixes branch [0].

AFAIU that branch contains 4.3-rc material so I guess it will land into mainline soon.

[0]: http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?h=fixes&id=de5abc98bf34e06d7accd943c4057843db921f00

Best regards,
Javier