Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wctc4xxp/base.c:661:54: error: macro "netif_napi_add" passed 4 arguments, but takes just 3 #49

Open
Omid-Mohajerani opened this issue Mar 27, 2024 · 3 comments

Comments

@Omid-Mohajerani
Copy link

Hi everyone,

I'm encountering an error while attempting to install Dahdi 3.3.0 on both RHEL 8 and Rocky Linux, using both manual installation and the provided installation script from https://github.com/InterLinked1/phreakscript.Any guidance or assistance to resolve this issue would be greatly appreciated.

  CC [M]  /usr/src/dahdi-linux-3.3.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_conf_bridge.o
/usr/src/dahdi-linux-3.3.0/drivers/dahdi/wctc4xxp/base.c: In function 'wctc4xxp_net_register':
/usr/src/dahdi-linux-3.3.0/drivers/dahdi/wctc4xxp/base.c:661:54: error: macro "netif_napi_add" passed 4 arguments, but takes just 3
  netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll, 64);
                                                      ^
/usr/src/dahdi-linux-3.3.0/drivers/dahdi/wctc4xxp/base.c:661:2: error: 'netif_napi_add' undeclared (first use in this function); did you mean 'netif_napi_del'?
  netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll, 64);
  ^~~~~~~~~~~~~~
  netif_napi_del
/usr/src/dahdi-linux-3.3.0/drivers/dahdi/wctc4xxp/base.c:661:2: note: each undeclared identifier is reported only once for each function it appears in
  LD [M]  /usr/src/dahdi-linux-3.3.0/drivers/dahdi/wct4xxp/wct4xxp.o
At top level:
/usr/src/dahdi-linux-3.3.0/drivers/dahdi/wctc4xxp/base.c:552:1: warning: 'wctc4xxp_poll' defined but not used [-Wunused-function]
 wctc4xxp_poll(struct napi_struct *napi, int budget)
 ^~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:318: /usr/src/dahdi-linux-3.3.0/drivers/dahdi/wctc4xxp/base.o] Error 1
make[2]: *** [scripts/Makefile.build:558: /usr/src/dahdi-linux-3.3.0/drivers/dahdi/wctc4xxp] Error 2
make[2]: *** Waiting for unfinished jobs....
  CC [M]  /usr/src/dahdi-linux-3.3.0/drivers/dahdi/oct612x/octdeviceapi/oct6100api/oct6100_api/oct6100_debug.o
  CC [M]  /usr/src/dahdi-linux-3.3.0/drivers/dahdi/wctdm24xxp/base.

Im testing on

Red Hat Enterprise Linux 8.9
4.18.0-513.18.1.el8_9.x86_64
@InterLinked1
Copy link
Contributor

What version of Rocky Linux were you testing on, 8 or 9? I thought I tested that a few months ago when somebody else was having the issue and resolved that, but if not, I can look into it. I think the patch is already around for that problem but just isn't been detected it needs to be applied.

I have not done any testing of RHEL myself.

@Omid-Mohajerani
Copy link
Author

I used Rocky Linux 8 but currently testing RHEL 8.9 - kernel version 4.18.0-513.18.1.el8_9.x86_64

I applied the fix that was mentioned here: #38

and it's working

  CC [M]  /usr/local/src/dahdi-linux/drivers/dahdi/wctc4xxp/base.o
In file included from /usr/local/src/dahdi-linux/drivers/dahdi/wctc4xxp/base.c:41:
/usr/local/src/dahdi-linux/include/dahdi/kernel.h:77: warning: "netif_napi_add" redefined
 #define netif_napi_add netif_napi_add_weight

In file included from ./include/net/inet_sock.h:23,
                 from ./include/linux/udp.h:20,
                 from /usr/local/src/dahdi-linux/drivers/dahdi/wctc4xxp/base.c:38:
./include/linux/netdevice.h:2511: note: this is the location of the previous definition
 #define netif_napi_add(dev, napi, poll) netif_napi_add_weight((dev), (napi), (poll), NAPI_POLL_WEIGHT)

  LD [M]  /usr/local/src/dahdi-linux/drivers/dahdi/wctc4xxp/wctc4xxp.o

But it stops on xbus-core.c:24

CC [M]  /usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.o
In file included from ./include/linux/module.h:18,
                 from /usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:24:
./include/linux/moduleparam.h:149:27: error: expected ')' before '&' token
  param_check_##type(name, &(value));       \
                           ^
./include/linux/moduleparam.h:129:2: note: in expansion of macro 'module_param_named'
  module_param_named(name, name, type, perm)
  ^~~~~~~~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xpd.h:56:2: note: in expansion of macro 'module_param'
  module_param(name, bool, perm); \
  ^~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:70:8: note: in expansion of macro 'DEF_PARM_BOOL'
 static DEF_PARM_BOOL(rx_tasklet, 0, 0644, "Use receive tasklets");
        ^~~~~~~~~~~~~
./include/linux/moduleparam.h:150:25: error: 'param_ops__Bool' undeclared here (not in a function); did you mean 'param_ops_bool'?
  module_param_cb(name, &param_ops_##type, &value, perm);     \
                         ^~~~~~~~~~
./include/linux/moduleparam.h:227:39: note: in definition of macro '__module_param_call'
  = { __param_str_##name, THIS_MODULE, ops,   \
                                       ^~~
./include/linux/moduleparam.h:150:2: note: in expansion of macro 'module_param_cb'
  module_param_cb(name, &param_ops_##type, &value, perm);     \
  ^~~~~~~~~~~~~~~
./include/linux/moduleparam.h:129:2: note: in expansion of macro 'module_param_named'
  module_param_named(name, name, type, perm)
  ^~~~~~~~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xpd.h:56:2: note: in expansion of macro 'module_param'
  module_param(name, bool, perm); \
  ^~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:70:8: note: in expansion of macro 'DEF_PARM_BOOL'
 static DEF_PARM_BOOL(rx_tasklet, 0, 0644, "Use receive tasklets");
        ^~~~~~~~~~~~~
./include/linux/moduleparam.h:149:27: error: expected ')' before '&' token
  param_check_##type(name, &(value));       \
                           ^
./include/linux/moduleparam.h:129:2: note: in expansion of macro 'module_param_named'
  module_param_named(name, name, type, perm)
  ^~~~~~~~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xpd.h:56:2: note: in expansion of macro 'module_param'
  module_param(name, bool, perm); \
  ^~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:71:8: note: in expansion of macro 'DEF_PARM_BOOL'
 static DEF_PARM_BOOL(dahdi_autoreg, 0, 0444,
        ^~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:318: /usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.o] Error 1
make[2]: *** [scripts/Makefile.build:558: /usr/local/src/dahdi-linux/drivers/dahdi/xpp] Error 2
make[1]: *** [Makefile:1619: _module_/usr/local/src/dahdi-linux/drivers/dahdi] Error 2
make[1]: Leaving directory '/usr/src/kernels/4.18.0-513.18.1.el8_9.x86_64'
make: *** [Makefile:74: modules] Error 2

@InterLinked1
Copy link
Contributor

I used Rocky Linux 8 but currently testing RHEL 8.9 - kernel version 4.18.0-513.18.1.el8_9.x86_64

I applied the fix that was mentioned here: #38

and it's working

  CC [M]  /usr/local/src/dahdi-linux/drivers/dahdi/wctc4xxp/base.o
In file included from /usr/local/src/dahdi-linux/drivers/dahdi/wctc4xxp/base.c:41:
/usr/local/src/dahdi-linux/include/dahdi/kernel.h:77: warning: "netif_napi_add" redefined
 #define netif_napi_add netif_napi_add_weight

In file included from ./include/net/inet_sock.h:23,
                 from ./include/linux/udp.h:20,
                 from /usr/local/src/dahdi-linux/drivers/dahdi/wctc4xxp/base.c:38:
./include/linux/netdevice.h:2511: note: this is the location of the previous definition
 #define netif_napi_add(dev, napi, poll) netif_napi_add_weight((dev), (napi), (poll), NAPI_POLL_WEIGHT)

  LD [M]  /usr/local/src/dahdi-linux/drivers/dahdi/wctc4xxp/wctc4xxp.o

But it stops on xbus-core.c:24

CC [M]  /usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.o
In file included from ./include/linux/module.h:18,
                 from /usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:24:
./include/linux/moduleparam.h:149:27: error: expected ')' before '&' token
  param_check_##type(name, &(value));       \
                           ^
./include/linux/moduleparam.h:129:2: note: in expansion of macro 'module_param_named'
  module_param_named(name, name, type, perm)
  ^~~~~~~~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xpd.h:56:2: note: in expansion of macro 'module_param'
  module_param(name, bool, perm); \
  ^~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:70:8: note: in expansion of macro 'DEF_PARM_BOOL'
 static DEF_PARM_BOOL(rx_tasklet, 0, 0644, "Use receive tasklets");
        ^~~~~~~~~~~~~
./include/linux/moduleparam.h:150:25: error: 'param_ops__Bool' undeclared here (not in a function); did you mean 'param_ops_bool'?
  module_param_cb(name, &param_ops_##type, &value, perm);     \
                         ^~~~~~~~~~
./include/linux/moduleparam.h:227:39: note: in definition of macro '__module_param_call'
  = { __param_str_##name, THIS_MODULE, ops,   \
                                       ^~~
./include/linux/moduleparam.h:150:2: note: in expansion of macro 'module_param_cb'
  module_param_cb(name, &param_ops_##type, &value, perm);     \
  ^~~~~~~~~~~~~~~
./include/linux/moduleparam.h:129:2: note: in expansion of macro 'module_param_named'
  module_param_named(name, name, type, perm)
  ^~~~~~~~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xpd.h:56:2: note: in expansion of macro 'module_param'
  module_param(name, bool, perm); \
  ^~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:70:8: note: in expansion of macro 'DEF_PARM_BOOL'
 static DEF_PARM_BOOL(rx_tasklet, 0, 0644, "Use receive tasklets");
        ^~~~~~~~~~~~~
./include/linux/moduleparam.h:149:27: error: expected ')' before '&' token
  param_check_##type(name, &(value));       \
                           ^
./include/linux/moduleparam.h:129:2: note: in expansion of macro 'module_param_named'
  module_param_named(name, name, type, perm)
  ^~~~~~~~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xpd.h:56:2: note: in expansion of macro 'module_param'
  module_param(name, bool, perm); \
  ^~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:71:8: note: in expansion of macro 'DEF_PARM_BOOL'
 static DEF_PARM_BOOL(dahdi_autoreg, 0, 0444,
        ^~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:318: /usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.o] Error 1
make[2]: *** [scripts/Makefile.build:558: /usr/local/src/dahdi-linux/drivers/dahdi/xpp] Error 2
make[1]: *** [Makefile:1619: _module_/usr/local/src/dahdi-linux/drivers/dahdi] Error 2
make[1]: Leaving directory '/usr/src/kernels/4.18.0-513.18.1.el8_9.x86_64'
make: *** [Makefile:74: modules] Error 2

I used Rocky Linux 8 but currently testing RHEL 8.9 - kernel version 4.18.0-513.18.1.el8_9.x86_64

I applied the fix that was mentioned here: #38

and it's working

  CC [M]  /usr/local/src/dahdi-linux/drivers/dahdi/wctc4xxp/base.o
In file included from /usr/local/src/dahdi-linux/drivers/dahdi/wctc4xxp/base.c:41:
/usr/local/src/dahdi-linux/include/dahdi/kernel.h:77: warning: "netif_napi_add" redefined
 #define netif_napi_add netif_napi_add_weight

In file included from ./include/net/inet_sock.h:23,
                 from ./include/linux/udp.h:20,
                 from /usr/local/src/dahdi-linux/drivers/dahdi/wctc4xxp/base.c:38:
./include/linux/netdevice.h:2511: note: this is the location of the previous definition
 #define netif_napi_add(dev, napi, poll) netif_napi_add_weight((dev), (napi), (poll), NAPI_POLL_WEIGHT)

  LD [M]  /usr/local/src/dahdi-linux/drivers/dahdi/wctc4xxp/wctc4xxp.o

But it stops on xbus-core.c:24

CC [M]  /usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.o
In file included from ./include/linux/module.h:18,
                 from /usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:24:
./include/linux/moduleparam.h:149:27: error: expected ')' before '&' token
  param_check_##type(name, &(value));       \
                           ^
./include/linux/moduleparam.h:129:2: note: in expansion of macro 'module_param_named'
  module_param_named(name, name, type, perm)
  ^~~~~~~~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xpd.h:56:2: note: in expansion of macro 'module_param'
  module_param(name, bool, perm); \
  ^~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:70:8: note: in expansion of macro 'DEF_PARM_BOOL'
 static DEF_PARM_BOOL(rx_tasklet, 0, 0644, "Use receive tasklets");
        ^~~~~~~~~~~~~
./include/linux/moduleparam.h:150:25: error: 'param_ops__Bool' undeclared here (not in a function); did you mean 'param_ops_bool'?
  module_param_cb(name, &param_ops_##type, &value, perm);     \
                         ^~~~~~~~~~
./include/linux/moduleparam.h:227:39: note: in definition of macro '__module_param_call'
  = { __param_str_##name, THIS_MODULE, ops,   \
                                       ^~~
./include/linux/moduleparam.h:150:2: note: in expansion of macro 'module_param_cb'
  module_param_cb(name, &param_ops_##type, &value, perm);     \
  ^~~~~~~~~~~~~~~
./include/linux/moduleparam.h:129:2: note: in expansion of macro 'module_param_named'
  module_param_named(name, name, type, perm)
  ^~~~~~~~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xpd.h:56:2: note: in expansion of macro 'module_param'
  module_param(name, bool, perm); \
  ^~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:70:8: note: in expansion of macro 'DEF_PARM_BOOL'
 static DEF_PARM_BOOL(rx_tasklet, 0, 0644, "Use receive tasklets");
        ^~~~~~~~~~~~~
./include/linux/moduleparam.h:149:27: error: expected ')' before '&' token
  param_check_##type(name, &(value));       \
                           ^
./include/linux/moduleparam.h:129:2: note: in expansion of macro 'module_param_named'
  module_param_named(name, name, type, perm)
  ^~~~~~~~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xpd.h:56:2: note: in expansion of macro 'module_param'
  module_param(name, bool, perm); \
  ^~~~~~~~~~~~
/usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.c:71:8: note: in expansion of macro 'DEF_PARM_BOOL'
 static DEF_PARM_BOOL(dahdi_autoreg, 0, 0444,
        ^~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:318: /usr/local/src/dahdi-linux/drivers/dahdi/xpp/xbus-core.o] Error 1
make[2]: *** [scripts/Makefile.build:558: /usr/local/src/dahdi-linux/drivers/dahdi/xpp] Error 2
make[1]: *** [Makefile:1619: _module_/usr/local/src/dahdi-linux/drivers/dahdi] Error 2
make[1]: Leaving directory '/usr/src/kernels/4.18.0-513.18.1.el8_9.x86_64'
make: *** [Makefile:74: modules] Error 2

I can't reproduce your issue with RHEL 8.9 and kernel 4.18.0-513.24.1:

  LD [M]  /usr/src/dahdi-linux-3.4.0/drivers/dahdi/wcte12xp/wcte12xp.o
  CC [M]  /usr/src/dahdi-linux-3.4.0/drivers/dahdi/xpp/xbus-core.o
  CC [M]  /usr/src/dahdi-linux-3.4.0/drivers/dahdi/xpp/xbus-sysfs.o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants