Hi Petri, [auto build test WARNING on net-next/master] [also build test WARNING on v4.8-rc1 next-20160812] [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/Petri-Gynther/Modify-is_zero_ether_addr-to-handle-byte-aligned-addresses/20160813-081835 config: x86_64-randconfig-n0-08130925 (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=x86_64 All warnings (new ones prefixed by >>): In file included from include/asm-generic/bug.h:4:0, from arch/x86/include/asm/bug.h:35, from include/linux/bug.h:4, from include/linux/mmdebug.h:4, from include/linux/gfp.h:4, from net/llc/llc_if.c:14: include/linux/etherdevice.h: In function 'is_zero_ether_addr': include/linux/etherdevice.h:96:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] if ((u32)addr & 0x1) ^ include/linux/compiler.h:149:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> include/linux/etherdevice.h:96:2: note: in expansion of macro 'if' if ((u32)addr & 0x1) ^~ include/linux/etherdevice.h:96:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] if ((u32)addr & 0x1) ^ include/linux/compiler.h:149:42: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> include/linux/etherdevice.h:96:2: note: in expansion of macro 'if' if ((u32)addr & 0x1) ^~ include/linux/etherdevice.h:96:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] if ((u32)addr & 0x1) ^ include/linux/compiler.h:160:16: note: in definition of macro '__trace_if' ______r = !!(cond); \ ^~~~ >> include/linux/etherdevice.h:96:2: note: in expansion of macro 'if' if ((u32)addr & 0x1) ^~ vim +/if +96 include/linux/etherdevice.h 80 #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) 81 return (((*(const u32 *)addr) ^ (*(const u32 *)b)) | 82 (__force int)((a[2] ^ b[2]) & m)) == 0; 83 #else 84 return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | ((a[2] ^ b[2]) & m)) == 0; 85 #endif 86 } 87 88 /** 89 * is_zero_ether_addr - Determine if give Ethernet address is all zeros. 90 * @addr: Pointer to a six-byte array containing the Ethernet address 91 * 92 * Return true if the address is all zeroes. 93 */ 94 static inline bool is_zero_ether_addr(const u8 *addr) 95 { > 96 if ((u32)addr & 0x1) 97 return (addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | 98 addr[5]) == 0; 99 100 #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) 101 return ((*(const u32 *)addr) | (*(const u16 *)(addr + 4))) == 0; 102 #else 103 return (*(const u16 *)(addr + 0) | 104 *(const u16 *)(addr + 2) | --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data