Re: [PATCH 2/2] staging: slicoss: slicoss.c: fix different address space sparse warnings

From: kbuild test robot
Date: Tue Sep 13 2016 - 13:47:56 EST


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-allyesconfig (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/slicoss.c: In function 'slic_upr_request_complete':
>> drivers/staging/slicoss/slicoss.c:1019:128: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
UPDATE_STATS_GB(stst->tcp.xmit_tcp_segs,
^
drivers/staging/slicoss/slicoss.c:1023:130: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
UPDATE_STATS_GB(stst->tcp.xmit_tcp_bytes,
^
drivers/staging/slicoss/slicoss.c:1027:126: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
UPDATE_STATS_GB(stst->tcp.rcv_tcp_segs,
^
drivers/staging/slicoss/slicoss.c:1031:128: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
UPDATE_STATS_GB(stst->tcp.rcv_tcp_bytes,
^
drivers/staging/slicoss/slicoss.c:1035:123: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
UPDATE_STATS_GB(stst->iface.xmt_bytes,
^
drivers/staging/slicoss/slicoss.c:1039:126: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
UPDATE_STATS_GB(stst->iface.xmt_ucast,
^
drivers/staging/slicoss/slicoss.c:1043:122: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
UPDATE_STATS_GB(stst->iface.rcv_bytes,
^
drivers/staging/slicoss/slicoss.c:1047:125: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
UPDATE_STATS_GB(stst->iface.rcv_ucast,
^
drivers/staging/slicoss/slicoss.c:1051:129: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
UPDATE_STATS_GB(stst->iface.xmt_errors,
^
drivers/staging/slicoss/slicoss.c:1055:136: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
UPDATE_STATS_GB(stst->iface.xmt_errors,
^
drivers/staging/slicoss/slicoss.c:1060:130: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
UPDATE_STATS_GB(stst->iface.xmt_errors,
^
drivers/staging/slicoss/slicoss.c:1064:129: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
UPDATE_STATS_GB(stst->iface.rcv_errors,
^
drivers/staging/slicoss/slicoss.c:1068:125: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
UPDATE_STATS_GB(stst->iface.rcv_discards,
^
drivers/staging/slicoss/slicoss.c:1072:95: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
if (IOMEM_GET_FIELD64(stats, rcv_drops) > old->rcv_drops)
^
drivers/staging/slicoss/slicoss.c:1074:95: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
(IOMEM_GET_FIELD64(stats, rcv_drops) -
^

vim +1019 drivers/staging/slicoss/slicoss.c

1003 adapter->upr_busy = 0;
1004 switch (upr->upr_request) {
1005 case SLIC_UPR_STATS: {
1006 struct slic_shmemory *sm = &adapter->shmem;
1007 struct slic_shmem_data __iomem *sm_data = sm->shmem_data;
1008 struct slic_stats __iomem *stats =
1009 IOMEM_GET_FIELDADDR(sm_data, stats);
1010 struct slic_stats *old = &adapter->inicstats_prev;
1011 struct slicnet_stats *stst = &adapter->slic_stats;
1012
1013 if (isr & ISR_UPCERR) {
1014 dev_err(&adapter->netdev->dev,
1015 "SLIC_UPR_STATS command failed isr[%x]\n", isr);
1016 break;
1017 }
1018
> 1019 UPDATE_STATS_GB(stst->tcp.xmit_tcp_segs,
1020 IOMEM_GET_FIELD64(stats, xmit_tcp_segs),
1021 old->xmit_tcp_segs);
1022
1023 UPDATE_STATS_GB(stst->tcp.xmit_tcp_bytes,
1024 IOMEM_GET_FIELD64(stats, xmit_tcp_bytes),
1025 old->xmit_tcp_bytes);
1026
1027 UPDATE_STATS_GB(stst->tcp.rcv_tcp_segs,

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

Attachment: .config.gz
Description: Binary data