[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201812282211.C9NshCbg%fengguang.wu@intel.com>
Date: Fri, 28 Dec 2018 22:46:50 +0800
From: kbuild test robot <lkp@...el.com>
To: huhai <huhai@...inos.cn>
Cc: kbuild-all@...org, will.deacon@....com, catalin.marinas@....com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
liuyun01@...inos.cn, huhai <huhai@...inos.cn>
Subject: Re: [PATCH] arm64/lib: add accelerated do_csum for arm64
Hi huhai,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on v4.20 next-20181224]
[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/huhai/arm64-lib-add-accelerated-do_csum-for-arm64/20181228-155335
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=arm64
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
arch/arm64/lib/checksum.c: In function 'do_csum':
>> arch/arm64/lib/checksum.c:85:5: warning: 'tmp1' may be used uninitialized in this function [-Wmaybe-uninitialized]
__asm__ __volatile__(
^~~~~~~
vim +/tmp1 +85 arch/arm64/lib/checksum.c
41
42 /*
43 * Do a 64-bit checksum on an arbitrary memory area.
44 * Returns a 16bit checksum.
45 */
46 unsigned int do_csum(const unsigned char *buff, unsigned len)
47 {
48 unsigned odd, count;
49 unsigned long result = 0;
50
51 if (unlikely(len == 0))
52 return result;
53 odd = 1 & (unsigned long) buff;
54 if (odd) {
55 result = *buff << 8;
56 len--;
57 buff++;
58 }
59 count = len >> 1; /* nr of 16-bit words.. */
60 if (count) {
61 if (2 & (unsigned long) buff) {
62 result += *(unsigned short *)buff;
63 count--;
64 len -= 2;
65 buff += 2;
66 }
67 count >>= 1; /* nr of 32-bit words.. */
68 if (count) {
69 unsigned long zero;
70 unsigned long tmp1;
71 unsigned count64;
72
73 if (4 & (unsigned long) buff) {
74 result += *(unsigned int *) buff;
75 count--;
76 len -= 4;
77 buff += 4;
78 }
79 count >>= 1; /* nr of 64-bit words.. */
80
81 /* main loop using 64byte blocks */
82 zero = 0;
83 count64 = count >> 3;
84 while (count64) {
> 85 __asm__ __volatile__(
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (61869 bytes)
Powered by blists - more mailing lists