Hi Peng,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on next-20160913]
[cannot apply to v4.8-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for 
convenience) to record what (public, well-known) commit your patch series was 
built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    
https://github.com/0day-ci/linux/commits/Peng-Sun/staging-slicoss-fix-sparse-warnings/20160913-190805
config: i386-randconfig-h1-09132219 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

        ^~~~~~~~~~~~~~~~~
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   drivers/staging/slicoss/slic.h:597:19: note: in definition of macro 
'UPDATE_STATS_GB'
     (largestat) += ((newstat) - (oldstat));                          \
                      ^~~~~~~
   drivers/staging/slicoss/slicoss.c:1032:5: note: in expansion of macro 
'IOMEM_GET_FIELD64'
        IOMEM_GET_FIELD64(stats, rcv_tcp_bytes),
        ^~~~~~~~~~~~~~~~~
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   drivers/staging/slicoss/slic.h:597:19: note: in definition of macro 
'UPDATE_STATS_GB'
     (largestat) += ((newstat) - (oldstat));                          \
                      ^~~~~~~
   drivers/staging/slicoss/slicoss.c:1036:5: note: in expansion of macro 
'IOMEM_GET_FIELD64'
        IOMEM_GET_FIELD64(stats, xmit_bytes),
        ^~~~~~~~~~~~~~~~~
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   drivers/staging/slicoss/slic.h:597:19: note: in definition of macro 
'UPDATE_STATS_GB'
     (largestat) += ((newstat) - (oldstat));                          \
                      ^~~~~~~
   drivers/staging/slicoss/slicoss.c:1040:5: note: in expansion of macro 
'IOMEM_GET_FIELD64'
        IOMEM_GET_FIELD64(stats, xmit_unicasts),
        ^~~~~~~~~~~~~~~~~
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   drivers/staging/slicoss/slic.h:597:19: note: in definition of macro 
'UPDATE_STATS_GB'
     (largestat) += ((newstat) - (oldstat));                          \
                      ^~~~~~~
   drivers/staging/slicoss/slicoss.c:1044:5: note: in expansion of macro 
'IOMEM_GET_FIELD64'
        IOMEM_GET_FIELD64(stats, rcv_bytes),
        ^~~~~~~~~~~~~~~~~
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   drivers/staging/slicoss/slic.h:597:19: note: in definition of macro 
'UPDATE_STATS_GB'
     (largestat) += ((newstat) - (oldstat));                          \
                      ^~~~~~~
   drivers/staging/slicoss/slicoss.c:1048:5: note: in expansion of macro 
'IOMEM_GET_FIELD64'
        IOMEM_GET_FIELD64(stats, rcv_unicasts),
        ^~~~~~~~~~~~~~~~~
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   drivers/staging/slicoss/slic.h:597:19: note: in definition of macro 
'UPDATE_STATS_GB'
     (largestat) += ((newstat) - (oldstat));                          \
                      ^~~~~~~
   drivers/staging/slicoss/slicoss.c:1052:5: note: in expansion of macro 
'IOMEM_GET_FIELD64'
        IOMEM_GET_FIELD64(stats, xmit_collisions),
        ^~~~~~~~~~~~~~~~~
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   drivers/staging/slicoss/slic.h:597:19: note: in definition of macro 
'UPDATE_STATS_GB'
     (largestat) += ((newstat) - (oldstat));                          \
                      ^~~~~~~
   drivers/staging/slicoss/slicoss.c:1056:5: note: in expansion of macro 
'IOMEM_GET_FIELD64'
        IOMEM_GET_FIELD64(stats,
        ^~~~~~~~~~~~~~~~~
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   drivers/staging/slicoss/slic.h:597:19: note: in definition of macro 
'UPDATE_STATS_GB'
     (largestat) += ((newstat) - (oldstat));                          \
                      ^~~~~~~
   drivers/staging/slicoss/slicoss.c:1061:5: note: in expansion of macro 
'IOMEM_GET_FIELD64'
        IOMEM_GET_FIELD64(stats, xmit_other_error),
        ^~~~~~~~~~~~~~~~~
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   drivers/staging/slicoss/slic.h:597:19: note: in definition of macro 
'UPDATE_STATS_GB'
     (largestat) += ((newstat) - (oldstat));                          \
                      ^~~~~~~
   drivers/staging/slicoss/slicoss.c:1065:5: note: in expansion of macro 
'IOMEM_GET_FIELD64'
        IOMEM_GET_FIELD64(stats, rcv_other_error),
        ^~~~~~~~~~~~~~~~~
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   drivers/staging/slicoss/slic.h:597:19: note: in definition of macro 
'UPDATE_STATS_GB'
     (largestat) += ((newstat) - (oldstat));                          \
                      ^~~~~~~
   drivers/staging/slicoss/slicoss.c:1069:5: note: in expansion of macro 
'IOMEM_GET_FIELD64'
        IOMEM_GET_FIELD64(stats, rcv_drops),
        ^~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from drivers/staging/slicoss/slicoss.c:66:
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/staging/slicoss/slicoss.c:1072:3: note: in expansion of macro 'if'
      if (IOMEM_GET_FIELD64(stats, rcv_drops) > old->rcv_drops)
      ^~
   drivers/staging/slicoss/slicoss.c:1072:7: note: in expansion of macro 
'IOMEM_GET_FIELD64'
      if (IOMEM_GET_FIELD64(stats, rcv_drops) > old->rcv_drops)
          ^~~~~~~~~~~~~~~~~
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   include/linux/compiler.h:149:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> drivers/staging/slicoss/slicoss.c:1072:3: note: in expansion of macro 'if'
      if (IOMEM_GET_FIELD64(stats, rcv_drops) > old->rcv_drops)
      ^~
   drivers/staging/slicoss/slicoss.c:1072:7: note: in expansion of macro 
'IOMEM_GET_FIELD64'
      if (IOMEM_GET_FIELD64(stats, rcv_drops) > old->rcv_drops)
          ^~~~~~~~~~~~~~~~~
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   include/linux/compiler.h:160:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers/staging/slicoss/slicoss.c:1072:3: note: in expansion of macro 'if'
      if (IOMEM_GET_FIELD64(stats, rcv_drops) > old->rcv_drops)
      ^~
   drivers/staging/slicoss/slicoss.c:1072:7: note: in expansion of macro 
'IOMEM_GET_FIELD64'
      if (IOMEM_GET_FIELD64(stats, rcv_drops) > old->rcv_drops)
          ^~~~~~~~~~~~~~~~~
   In file included from drivers/staging/slicoss/slicoss.c:97:0:
   drivers/staging/slicoss/slic.h:575:2: warning: ISO C90 forbids mixed 
declarations and code [-Wdeclaration-after-statement]
     u64 val = ((u64)ioread8(_base + 7)) << 56;   \
     ^
   drivers/staging/slicoss/slicoss.c:1074:7: note: in expansion of macro 
'IOMEM_GET_FIELD64'
         (IOMEM_GET_FIELD64(stats, rcv_drops) -
          ^~~~~~~~~~~~~~~~~

vim +/if +1072 drivers/staging/slicoss/slicoss.c

  1056                                  IOMEM_GET_FIELD64(stats,
  1057                                                    
xmit_excess_collisions),
  1058                                  old->xmit_excess_collisions);
  1059  
  1060                  UPDATE_STATS_GB(stst->iface.xmt_errors,
  1061                                  IOMEM_GET_FIELD64(stats, 
xmit_other_error),
  1062                                  old->xmit_other_error);
  1063  
  1064                  UPDATE_STATS_GB(stst->iface.rcv_errors,
  1065                                  IOMEM_GET_FIELD64(stats, 
rcv_other_error),
  1066                                  old->rcv_other_error);
  1067  
  1068                  UPDATE_STATS_GB(stst->iface.rcv_discards,
  1069                                  IOMEM_GET_FIELD64(stats, rcv_drops),
  1070                                  old->rcv_drops);
  1071  
> 1072                  if (IOMEM_GET_FIELD64(stats, rcv_drops) > 
> old->rcv_drops)
  1073                          adapter->rcv_drops +=
  1074                                          (IOMEM_GET_FIELD64(stats, 
rcv_drops) -
  1075                                                 old->rcv_drops);
  1076                  memcpy_fromio(old, stats, sizeof(*stats));
  1077                  break;
  1078          }
  1079          case SLIC_UPR_RLSR:
  1080                  slic_link_upr_complete(adapter, isr);

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

Attachment: .config.gz
Description: Binary data

Reply via email to