drivers/media/dvb-core/dvbdev.h:157:18: error: too many arguments to function '__a'

From: Fengguang Wu
Date: Sun Oct 11 2015 - 05:09:17 EST


Hi Kozlov,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4a06c8ac2fb3ef484579ce44f9b809bd310fad48
commit: 52b1eaf4c59a3bbd07afbb4ab4f43418a807d02e [media] netup_unidvb: NetUP Universal DVB-S/S2/T/T2/C PCI-E card driver
date: 9 weeks ago
config: x86_64-randconfig-b0-10111047 (attached as .config)
reproduce:
git checkout 52b1eaf4c59a3bbd07afbb4ab4f43418a807d02e
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

In file included from drivers/media/pci/netup_unidvb/netup_unidvb_core.c:34:0:
drivers/media/dvb-frontends/horus3a.h:51:13: warning: 'struct cxd2820r_config' declared inside parameter list
struct i2c_adapter *i2c)
^
drivers/media/dvb-frontends/horus3a.h:51:13: warning: its scope is only this definition or declaration, which is probably not what you want
In file included from drivers/media/pci/netup_unidvb/netup_unidvb_core.c:36:0:
drivers/media/dvb-frontends/lnbh25.h:46:15: error: unknown type name 'dvb_frontend'
static inline dvb_frontend *lnbh25_attach(
^
In file included from include/media/videobuf2-dvb.h:4:0,
from drivers/media/pci/netup_unidvb/netup_unidvb.h:26,
from drivers/media/pci/netup_unidvb/netup_unidvb_core.c:32:
drivers/media/pci/netup_unidvb/netup_unidvb_core.c: In function 'netup_unidvb_dvb_init':
drivers/media/pci/netup_unidvb/netup_unidvb_core.c:417:34: warning: passing argument 1 of '__a' from incompatible pointer type [-Wincompatible-pointer-types]
if (!dvb_attach(horus3a_attach, fe0->dvb.frontend,
^
drivers/media/dvb-core/dvbdev.h:157:22: note: in definition of macro 'dvb_attach'
__r = (void *) __a(ARGS); \
^
drivers/media/pci/netup_unidvb/netup_unidvb_core.c:417:34: note: expected 'const struct cxd2820r_config *' but argument is of type 'struct dvb_frontend *'
if (!dvb_attach(horus3a_attach, fe0->dvb.frontend,
^
drivers/media/dvb-core/dvbdev.h:157:22: note: in definition of macro 'dvb_attach'
__r = (void *) __a(ARGS); \
^
drivers/media/pci/netup_unidvb/netup_unidvb_core.c:418:4: warning: passing argument 2 of '__a' from incompatible pointer type [-Wincompatible-pointer-types]
&horus3a_conf, &ndev->i2c[num].adap)) {
^
drivers/media/dvb-core/dvbdev.h:157:22: note: in definition of macro 'dvb_attach'
__r = (void *) __a(ARGS); \
^
drivers/media/pci/netup_unidvb/netup_unidvb_core.c:418:4: note: expected 'struct i2c_adapter *' but argument is of type 'struct horus3a_config *'
&horus3a_conf, &ndev->i2c[num].adap)) {
^
drivers/media/dvb-core/dvbdev.h:157:22: note: in definition of macro 'dvb_attach'
__r = (void *) __a(ARGS); \
^
>> drivers/media/dvb-core/dvbdev.h:157:18: error: too many arguments to function '__a'
__r = (void *) __a(ARGS); \
^
drivers/media/pci/netup_unidvb/netup_unidvb_core.c:417:7: note: in expansion of macro 'dvb_attach'
if (!dvb_attach(horus3a_attach, fe0->dvb.frontend,
^

vim +/__a +157 drivers/media/dvb-core/dvbdev.h

16ef8def drivers/media/dvb/dvb-core/dvbdev.h Arnd Bergmann 2010-04-27 141 extern long dvb_generic_ioctl (struct file *file,
^1da177e drivers/media/dvb/dvb-core/dvbdev.h Linus Torvalds 2005-04-16 142 unsigned int cmd, unsigned long arg);
^1da177e drivers/media/dvb/dvb-core/dvbdev.h Linus Torvalds 2005-04-16 143
^1da177e drivers/media/dvb/dvb-core/dvbdev.h Linus Torvalds 2005-04-16 144 /* we don't mess with video_usercopy() any more,
^1da177e drivers/media/dvb/dvb-core/dvbdev.h Linus Torvalds 2005-04-16 145 we simply define out own dvb_usercopy(), which will hopefully become
^1da177e drivers/media/dvb/dvb-core/dvbdev.h Linus Torvalds 2005-04-16 146 generic_usercopy() someday... */
^1da177e drivers/media/dvb/dvb-core/dvbdev.h Linus Torvalds 2005-04-16 147
16ef8def drivers/media/dvb/dvb-core/dvbdev.h Arnd Bergmann 2010-04-27 148 extern int dvb_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
16ef8def drivers/media/dvb/dvb-core/dvbdev.h Arnd Bergmann 2010-04-27 149 int (*func)(struct file *file, unsigned int cmd, void *arg));
^1da177e drivers/media/dvb/dvb-core/dvbdev.h Linus Torvalds 2005-04-16 150
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 151 /** generic DVB attach function. */
149ef72d drivers/media/dvb/dvb-core/dvbdev.h Mauro Carvalho Chehab 2008-04-29 152 #ifdef CONFIG_MEDIA_ATTACH
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 153 #define dvb_attach(FUNCTION, ARGS...) ({ \
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 154 void *__r = NULL; \
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 155 typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 156 if (__a) { \
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 @157 __r = (void *) __a(ARGS); \
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 158 if (__r == NULL) \
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 159 symbol_put(FUNCTION); \
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 160 } else { \
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 161 printk(KERN_ERR "DVB: Unable to find symbol "#FUNCTION"()\n"); \
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 162 } \
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 163 __r; \
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 164 })
d9955060 drivers/media/dvb/dvb-core/dvbdev.h Andrew de Quincey 2006-08-08 165



---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data