All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-stable-rc:linux-4.4.y 8475/9999] drivers/net/can/mscan/mscan.c:426:14: error: invalid use of void expression
@ 2021-05-17  3:19 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-17  3:19 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 15821 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
head:   95a3867e897abd7811196123f81a119a75aba863
commit: 177aa4d14d912a33a4490644987ac499e8bb9e11 [8475/9999] can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode
config: powerpc64-randconfig-r031-20210517 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 7.5.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=177aa4d14d912a33a4490644987ac499e8bb9e11
        git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc linux-4.4.y
        git checkout 177aa4d14d912a33a4490644987ac499e8bb9e11
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross W=1 ARCH=powerpc64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   include/linux/netdevice.h:3027:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(index >= dev->num_rx_queues);
     ^~~~~~
   include/linux/netdevice.h:3027:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     BUG_ON(index >= dev->num_rx_queues);
                  ^
   include/linux/compiler.h:174:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
   arch/powerpc/include/asm/bug.h:75:2: note: in expansion of macro 'if'
     if (__builtin_constant_p(x)) {    \
     ^~
   include/linux/netdevice.h:3027:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(index >= dev->num_rx_queues);
     ^~~~~~
   include/linux/netdevice.h:3027:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     BUG_ON(index >= dev->num_rx_queues);
                  ^
   include/linux/compiler.h:163:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   arch/powerpc/include/asm/bug.h:76:3: note: in expansion of macro 'if'
      if (x)      \
      ^~
   include/linux/netdevice.h:3027:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(index >= dev->num_rx_queues);
     ^~~~~~
   include/linux/netdevice.h:3027:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     BUG_ON(index >= dev->num_rx_queues);
                  ^
   include/linux/compiler.h:163:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
   arch/powerpc/include/asm/bug.h:76:3: note: in expansion of macro 'if'
      if (x)      \
      ^~
   include/linux/netdevice.h:3027:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(index >= dev->num_rx_queues);
     ^~~~~~
   include/linux/netdevice.h:3027:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     BUG_ON(index >= dev->num_rx_queues);
                  ^
   include/linux/compiler.h:174:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
   arch/powerpc/include/asm/bug.h:76:3: note: in expansion of macro 'if'
      if (x)      \
      ^~
   include/linux/netdevice.h:3027:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(index >= dev->num_rx_queues);
     ^~~~~~
   In file included from include/linux/bug.h:4:0,
                    from include/linux/thread_info.h:11,
                    from include/asm-generic/preempt.h:4,
                    from arch/powerpc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:59,
                    from include/linux/spinlock.h:50,
                    from include/linux/seqlock.h:35,
                    from include/linux/time.h:5,
                    from include/linux/stat.h:18,
                    from include/linux/module.h:10,
                    from drivers/net/can/mscan/mscan.c:23:
   include/linux/netdevice.h:3027:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     BUG_ON(index >= dev->num_rx_queues);
                  ^
   arch/powerpc/include/asm/bug.h:84:25: note: in definition of macro 'BUG_ON'
        "r" ((__force long)(x)));   \
                            ^
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from drivers/net/can/mscan/mscan.c:22:
   include/linux/netdevice.h: In function 'netif_msg_init':
   include/linux/netdevice.h:3301:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
                                        ^
   include/linux/compiler.h:163:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   include/linux/netdevice.h:3301:2: note: in expansion of macro 'if'
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
     ^~
   include/linux/netdevice.h:3301:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
                                        ^
   include/linux/compiler.h:163:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
   include/linux/netdevice.h:3301:2: note: in expansion of macro 'if'
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
     ^~
   include/linux/netdevice.h:3301:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
                                        ^
   include/linux/compiler.h:174:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
   include/linux/netdevice.h:3301:2: note: in expansion of macro 'if'
     if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
     ^~
   drivers/net/can/mscan/mscan.c: In function 'mscan_rx_poll':
>> drivers/net/can/mscan/mscan.c:426:14: error: invalid use of void expression
      if (likely(napi_complete_done(&priv->napi, work_done))) {
                 ^
   include/linux/compiler.h:163:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   drivers/net/can/mscan/mscan.c:426:3: note: in expansion of macro 'if'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
      ^~
   drivers/net/can/mscan/mscan.c:426:7: note: in expansion of macro 'likely'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
          ^~~~~~
>> include/linux/compiler.h:150:49: error: invalid use of void expression
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                    ^
   include/linux/compiler.h:163:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   drivers/net/can/mscan/mscan.c:426:3: note: in expansion of macro 'if'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
      ^~
   drivers/net/can/mscan/mscan.c:426:7: note: in expansion of macro 'likely'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
          ^~~~~~
   include/linux/compiler.h:126:45: error: invalid use of void expression
    #define likely_notrace(x) __builtin_expect(!!(x), 1)
                                                ^
   include/linux/compiler.h:163:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   drivers/net/can/mscan/mscan.c:426:3: note: in expansion of macro 'if'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
      ^~
   include/linux/compiler.h:139:14: note: in expansion of macro 'likely_notrace'
       ______r = likely_notrace(x);   \
                 ^~~~~~~~~~~~~~
   include/linux/compiler.h:150:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^~~~~~~~~~~~~~~~
   drivers/net/can/mscan/mscan.c:426:7: note: in expansion of macro 'likely'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
          ^~~~~~
>> drivers/net/can/mscan/mscan.c:426:14: error: invalid use of void expression
      if (likely(napi_complete_done(&priv->napi, work_done))) {
                 ^
   include/linux/compiler.h:163:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
   drivers/net/can/mscan/mscan.c:426:3: note: in expansion of macro 'if'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
      ^~
   drivers/net/can/mscan/mscan.c:426:7: note: in expansion of macro 'likely'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
          ^~~~~~
>> include/linux/compiler.h:150:49: error: invalid use of void expression
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                    ^
   include/linux/compiler.h:163:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
   drivers/net/can/mscan/mscan.c:426:3: note: in expansion of macro 'if'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
      ^~
   drivers/net/can/mscan/mscan.c:426:7: note: in expansion of macro 'likely'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
          ^~~~~~
   include/linux/compiler.h:126:45: error: invalid use of void expression
    #define likely_notrace(x) __builtin_expect(!!(x), 1)
                                                ^
   include/linux/compiler.h:163:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
   drivers/net/can/mscan/mscan.c:426:3: note: in expansion of macro 'if'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
      ^~
   include/linux/compiler.h:139:14: note: in expansion of macro 'likely_notrace'
       ______r = likely_notrace(x);   \
                 ^~~~~~~~~~~~~~
   include/linux/compiler.h:150:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^~~~~~~~~~~~~~~~
   drivers/net/can/mscan/mscan.c:426:7: note: in expansion of macro 'likely'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
          ^~~~~~
>> drivers/net/can/mscan/mscan.c:426:14: error: invalid use of void expression
      if (likely(napi_complete_done(&priv->napi, work_done))) {
                 ^
   include/linux/compiler.h:174:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
   drivers/net/can/mscan/mscan.c:426:3: note: in expansion of macro 'if'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
      ^~
   drivers/net/can/mscan/mscan.c:426:7: note: in expansion of macro 'likely'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
          ^~~~~~
>> include/linux/compiler.h:150:49: error: invalid use of void expression
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                    ^
   include/linux/compiler.h:174:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
   drivers/net/can/mscan/mscan.c:426:3: note: in expansion of macro 'if'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
      ^~
   drivers/net/can/mscan/mscan.c:426:7: note: in expansion of macro 'likely'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
          ^~~~~~
   include/linux/compiler.h:126:45: error: invalid use of void expression
    #define likely_notrace(x) __builtin_expect(!!(x), 1)
                                                ^
   include/linux/compiler.h:174:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
   drivers/net/can/mscan/mscan.c:426:3: note: in expansion of macro 'if'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
      ^~
   include/linux/compiler.h:139:14: note: in expansion of macro 'likely_notrace'
       ______r = likely_notrace(x);   \
                 ^~~~~~~~~~~~~~
   include/linux/compiler.h:150:56: note: in expansion of macro '__branch_check__'
    #  define likely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 1))
                                                           ^~~~~~~~~~~~~~~~
   drivers/net/can/mscan/mscan.c:426:7: note: in expansion of macro 'likely'
      if (likely(napi_complete_done(&priv->napi, work_done))) {
          ^~~~~~
   drivers/net/can/mscan/mscan.c: In function 'mscan_start_xmit':
   drivers/net/can/mscan/mscan.c:222:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
      netif_stop_queue(dev);
      ^~~~~~~~~~~~~~~~~~~~~
   drivers/net/can/mscan/mscan.c:223:2: note: here
     case 2:
     ^~~~


vim +426 drivers/net/can/mscan/mscan.c

   388	
   389	static int mscan_rx_poll(struct napi_struct *napi, int quota)
   390	{
   391		struct mscan_priv *priv = container_of(napi, struct mscan_priv, napi);
   392		struct net_device *dev = napi->dev;
   393		struct mscan_regs __iomem *regs = priv->reg_base;
   394		struct net_device_stats *stats = &dev->stats;
   395		int work_done = 0;
   396		struct sk_buff *skb;
   397		struct can_frame *frame;
   398		u8 canrflg;
   399	
   400		while (work_done < quota) {
   401			canrflg = in_8(&regs->canrflg);
   402			if (!(canrflg & (MSCAN_RXF | MSCAN_ERR_IF)))
   403				break;
   404	
   405			skb = alloc_can_skb(dev, &frame);
   406			if (!skb) {
   407				if (printk_ratelimit())
   408					netdev_notice(dev, "packet dropped\n");
   409				stats->rx_dropped++;
   410				out_8(&regs->canrflg, canrflg);
   411				continue;
   412			}
   413	
   414			if (canrflg & MSCAN_RXF)
   415				mscan_get_rx_frame(dev, frame);
   416			else if (canrflg & MSCAN_ERR_IF)
   417				mscan_get_err_frame(dev, frame, canrflg);
   418	
   419			stats->rx_packets++;
   420			stats->rx_bytes += frame->can_dlc;
   421			work_done++;
   422			netif_receive_skb(skb);
   423		}
   424	
   425		if (work_done < quota) {
 > 426			if (likely(napi_complete_done(&priv->napi, work_done))) {
   427				clear_bit(F_RX_PROGRESS, &priv->flags);
   428				if (priv->can.state < CAN_STATE_BUS_OFF)
   429					out_8(&regs->canrier, priv->shadow_canrier);
   430			}
   431		}
   432		return work_done;
   433	}
   434	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26435 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-17  3:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17  3:19 [linux-stable-rc:linux-4.4.y 8475/9999] drivers/net/can/mscan/mscan.c:426:14: error: invalid use of void expression kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.