[dpdk-dev] [PATCH] kni: fix unused variable compile error

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Oct 14 14:30:05 CEST 2016


2016-10-14 12:24, Ferruh Yigit:
> compile error:
>   CC [M]  .../lib/librte_eal/linuxapp/kni/kni_misc.o
> cc1: warnings being treated as errors
> .../lib/librte_eal/linuxapp/kni/kni_misc.c: In function ‘kni_exit_net’:
> .../lib/librte_eal/linuxapp/kni/kni_misc.c:113:18:
> error: unused variable ‘knet’
> 
> For some kernel versions mutex_destroy() is macro and does nothing,
> this cause an unused variable warning for knet which used in mutex_destroy
> 
> Added unused attribute to the knet variable.
> 
> Fixes: 93a298b34e1b ("kni: support core id parameter in single threaded mode")
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>

That's why supporting an out-of-tree kernel module is a nightmare.
Compilation breaks everytime with various kernels :(

Please could you tell which Linux versions are affected?


More information about the dev mailing list