staging: fix macros with multiple statements in rtl8723bs/core/rtw_security.c

kbuild test robot lkp at intel.com
Fri May 5 04:24:57 UTC 2017


Hi Jamie,

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on next-20170504]
[cannot apply to v4.11]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Jamie-Huang/staging-fix-macros-with-multiple-statements-in-rtl8723bs-core-rtw_security-c/20170505-052107
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All error/warnings (new ones prefixed by >>):

   drivers/staging/rtl8723bs/core/rtw_security.c: In function 'rijndaelEncrypt':
>> drivers/staging/rtl8723bs/core/rtw_security.c:2256:1: error: expected ';' before '}' token
    } while (0)
    ^
>> drivers/staging/rtl8723bs/core/rtw_security.c:2261:3: note: in expansion of macro 'ROUND'
      ROUND(1, t, s);
      ^~~~~
>> drivers/staging/rtl8723bs/core/rtw_security.c:2256:1: error: expected ';' before '}' token
    } while (0)
    ^
   drivers/staging/rtl8723bs/core/rtw_security.c:2265:3: note: in expansion of macro 'ROUND'
      ROUND(0, s, t);
      ^~~~~

vim +2256 drivers/staging/rtl8723bs/core/rtw_security.c

  2250	#define ROUND(i, d, s) \
  2251	do {	\
  2252		d##0 = TE0(s##0) ^ TE1(s##1) ^ TE2(s##2) ^ TE3(s##3) ^ rk[4 * i]; \
  2253		d##1 = TE0(s##1) ^ TE1(s##2) ^ TE2(s##3) ^ TE3(s##0) ^ rk[4 * i + 1]; \
  2254		d##2 = TE0(s##2) ^ TE1(s##3) ^ TE2(s##0) ^ TE3(s##1) ^ rk[4 * i + 2]; \
  2255		d##3 = TE0(s##3) ^ TE1(s##0) ^ TE2(s##1) ^ TE3(s##2) ^ rk[4 * i + 3] \
> 2256	} while (0)
  2257	
  2258		/* Nr - 1 full rounds: */
  2259		r = Nr >> 1;
  2260		for (;;) {
> 2261			ROUND(1, t, s);
  2262			rk += 8;
  2263			if (--r == 0)
  2264				break;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 46901 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20170505/9d213624/attachment-0001.bin>


More information about the devel mailing list