Message ID | 1468079460-10153-1-git-send-email-arvind.yadav.cs@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
Hi, [auto build test WARNING on v4.7-rc6] [also build test WARNING on next-20160708] [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/Arvind-Yadav/ErrHandling-Make-IS_ERR_VALUE_U32-as-generic-API-to-avoid-IS_ERR_VALUE-abuses/20160709-235356 config: x86_64-rhel (attached as .config) compiler: gcc-4.9 (Debian 4.9.3-14) 4.9.3 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/mod_devicetable.h:11, from include/linux/pci.h:20, from include/linux/bcma/bcma.h:4, from drivers/bcma/bcma_private.h:8, from drivers/bcma/scan.c:9: drivers/bcma/scan.c: In function 'bcma_get_next_core': include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ >> drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^ >> include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ >> drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/bcma/scan.c:365:19: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^ >> include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/bcma/scan.c:365:19: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/bcma/scan.c:380:8: note: in expansion of macro 'IS_ERR_VALUE_U32' if (IS_ERR_VALUE_U32(tmp)) { ^ >> include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/bcma/scan.c:380:8: note: in expansion of macro 'IS_ERR_VALUE_U32' if (IS_ERR_VALUE_U32(tmp)) { ^ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/bcma/scan.c:397:8: note: in expansion of macro 'IS_ERR_VALUE_U32' if (IS_ERR_VALUE_U32(tmp)) { ^ >> include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/bcma/scan.c:397:8: note: in expansion of macro 'IS_ERR_VALUE_U32' if (IS_ERR_VALUE_U32(tmp)) { ^ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/bcma/scan.c:415:8: note: in expansion of macro 'IS_ERR_VALUE_U32' if (IS_ERR_VALUE_U32(tmp)) { ^ >> include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/bcma/scan.c:415:8: note: in expansion of macro 'IS_ERR_VALUE_U32' if (IS_ERR_VALUE_U32(tmp)) { ^ vim +/IS_ERR_VALUE_U32 +361 drivers/bcma/scan.c 517f43e5 Hauke Mehrtens 2011-07-23 345 )) { 517f43e5 Hauke Mehrtens 2011-07-23 346 bcma_erom_skip_component(bus, eromptr); 517f43e5 Hauke Mehrtens 2011-07-23 347 return -ENODEV; 517f43e5 Hauke Mehrtens 2011-07-23 348 } 517f43e5 Hauke Mehrtens 2011-07-23 349 8369ae33 Rafał Miłecki 2011-05-09 350 /* get & parse master ports */ 8369ae33 Rafał Miłecki 2011-05-09 351 for (i = 0; i < ports[0]; i++) { 4e0d8cc1 Dan Carpenter 2011-08-23 352 s32 mst_port_d = bcma_erom_get_mst_port(bus, eromptr); 982eee67 Hauke Mehrtens 2011-07-23 353 if (mst_port_d < 0) 982eee67 Hauke Mehrtens 2011-07-23 354 return -EILSEQ; 8369ae33 Rafał Miłecki 2011-05-09 355 } 8369ae33 Rafał Miłecki 2011-05-09 356 e167d9fb Hauke Mehrtens 2012-03-15 357 /* First Slave Address Descriptor should be port 0: e167d9fb Hauke Mehrtens 2012-03-15 358 * the main register space for the core e167d9fb Hauke Mehrtens 2012-03-15 359 */ e167d9fb Hauke Mehrtens 2012-03-15 360 tmp = bcma_erom_get_addr_desc(bus, eromptr, SCAN_ADDR_TYPE_SLAVE, 0); aaa2ced1 Hauke Mehrtens 2013-09-07 @361 if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { e167d9fb Hauke Mehrtens 2012-03-15 362 /* Try again to see if it is a bridge */ e167d9fb Hauke Mehrtens 2012-03-15 363 tmp = bcma_erom_get_addr_desc(bus, eromptr, e167d9fb Hauke Mehrtens 2012-03-15 364 SCAN_ADDR_TYPE_BRIDGE, 0); aaa2ced1 Hauke Mehrtens 2013-09-07 365 if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { e167d9fb Hauke Mehrtens 2012-03-15 366 return -EILSEQ; e167d9fb Hauke Mehrtens 2012-03-15 367 } else { 3d9d8af3 Rafał Miłecki 2012-07-05 368 bcma_info(bus, "Bridge found\n"); e167d9fb Hauke Mehrtens 2012-03-15 369 return -ENXIO; :::::: The code at line 361 was first introduced by commit :::::: aaa2ced15ad8dca8048666c9f70736424d696a6b bcma: fix error code handling on 64 Bit systems :::::: TO: Hauke Mehrtens <hauke@hauke-m.de> :::::: CC: John W. Linville <linville@tuxdriver.com> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Hi, I have summited one more version-2 patch. Please test on that. please share your result with us. Thanks, Arvind yadav On Saturday 09 July 2016 10:08 PM, kbuild test robot wrote: > Hi, > > [auto build test WARNING on v4.7-rc6] > [also build test WARNING on next-20160708] > [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/Arvind-Yadav/ErrHandling-Make-IS_ERR_VALUE_U32-as-generic-API-to-avoid-IS_ERR_VALUE-abuses/20160709-235356 > config: x86_64-rhel (attached as .config) > compiler: gcc-4.9 (Debian 4.9.3-14) 4.9.3 > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 > > All warnings (new ones prefixed by >>): > > In file included from include/uapi/linux/stddef.h:1:0, > from include/linux/stddef.h:4, > from include/uapi/linux/posix_types.h:4, > from include/uapi/linux/types.h:13, > from include/linux/types.h:5, > from include/linux/mod_devicetable.h:11, > from include/linux/pci.h:20, > from include/linux/bcma/bcma.h:4, > from drivers/bcma/bcma_private.h:8, > from drivers/bcma/scan.c:9: > drivers/bcma/scan.c: In function 'bcma_get_next_core': > include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] > #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) > ^ > include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' > # define unlikely(x) __builtin_expect(!!(x), 0) > ^ >>> drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' > if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { > ^ >>> include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] > #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) > ^ > include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' > # define unlikely(x) __builtin_expect(!!(x), 0) > ^ >>> drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' > if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { > ^ > include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] > #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) > ^ > include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' > # define unlikely(x) __builtin_expect(!!(x), 0) > ^ > drivers/bcma/scan.c:365:19: note: in expansion of macro 'IS_ERR_VALUE_U32' > if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { > ^ >>> include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] > #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) > ^ > include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' > # define unlikely(x) __builtin_expect(!!(x), 0) > ^ > drivers/bcma/scan.c:365:19: note: in expansion of macro 'IS_ERR_VALUE_U32' > if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { > ^ > include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] > #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) > ^ > include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' > # define unlikely(x) __builtin_expect(!!(x), 0) > ^ > drivers/bcma/scan.c:380:8: note: in expansion of macro 'IS_ERR_VALUE_U32' > if (IS_ERR_VALUE_U32(tmp)) { > ^ >>> include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] > #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) > ^ > include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' > # define unlikely(x) __builtin_expect(!!(x), 0) > ^ > drivers/bcma/scan.c:380:8: note: in expansion of macro 'IS_ERR_VALUE_U32' > if (IS_ERR_VALUE_U32(tmp)) { > ^ > include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] > #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) > ^ > include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' > # define unlikely(x) __builtin_expect(!!(x), 0) > ^ > drivers/bcma/scan.c:397:8: note: in expansion of macro 'IS_ERR_VALUE_U32' > if (IS_ERR_VALUE_U32(tmp)) { > ^ >>> include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] > #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) > ^ > include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' > # define unlikely(x) __builtin_expect(!!(x), 0) > ^ > drivers/bcma/scan.c:397:8: note: in expansion of macro 'IS_ERR_VALUE_U32' > if (IS_ERR_VALUE_U32(tmp)) { > ^ > include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] > #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) > ^ > include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' > # define unlikely(x) __builtin_expect(!!(x), 0) > ^ > drivers/bcma/scan.c:415:8: note: in expansion of macro 'IS_ERR_VALUE_U32' > if (IS_ERR_VALUE_U32(tmp)) { > ^ >>> include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] > #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) > ^ > include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' > # define unlikely(x) __builtin_expect(!!(x), 0) > ^ > drivers/bcma/scan.c:415:8: note: in expansion of macro 'IS_ERR_VALUE_U32' > if (IS_ERR_VALUE_U32(tmp)) { > ^ > > vim +/IS_ERR_VALUE_U32 +361 drivers/bcma/scan.c > > 517f43e5 Hauke Mehrtens 2011-07-23 345 )) { > 517f43e5 Hauke Mehrtens 2011-07-23 346 bcma_erom_skip_component(bus, eromptr); > 517f43e5 Hauke Mehrtens 2011-07-23 347 return -ENODEV; > 517f43e5 Hauke Mehrtens 2011-07-23 348 } > 517f43e5 Hauke Mehrtens 2011-07-23 349 > 8369ae33 Rafał Miłecki 2011-05-09 350 /* get & parse master ports */ > 8369ae33 Rafał Miłecki 2011-05-09 351 for (i = 0; i < ports[0]; i++) { > 4e0d8cc1 Dan Carpenter 2011-08-23 352 s32 mst_port_d = bcma_erom_get_mst_port(bus, eromptr); > 982eee67 Hauke Mehrtens 2011-07-23 353 if (mst_port_d < 0) > 982eee67 Hauke Mehrtens 2011-07-23 354 return -EILSEQ; > 8369ae33 Rafał Miłecki 2011-05-09 355 } > 8369ae33 Rafał Miłecki 2011-05-09 356 > e167d9fb Hauke Mehrtens 2012-03-15 357 /* First Slave Address Descriptor should be port 0: > e167d9fb Hauke Mehrtens 2012-03-15 358 * the main register space for the core > e167d9fb Hauke Mehrtens 2012-03-15 359 */ > e167d9fb Hauke Mehrtens 2012-03-15 360 tmp = bcma_erom_get_addr_desc(bus, eromptr, SCAN_ADDR_TYPE_SLAVE, 0); > aaa2ced1 Hauke Mehrtens 2013-09-07 @361 if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { > e167d9fb Hauke Mehrtens 2012-03-15 362 /* Try again to see if it is a bridge */ > e167d9fb Hauke Mehrtens 2012-03-15 363 tmp = bcma_erom_get_addr_desc(bus, eromptr, > e167d9fb Hauke Mehrtens 2012-03-15 364 SCAN_ADDR_TYPE_BRIDGE, 0); > aaa2ced1 Hauke Mehrtens 2013-09-07 365 if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { > e167d9fb Hauke Mehrtens 2012-03-15 366 return -EILSEQ; > e167d9fb Hauke Mehrtens 2012-03-15 367 } else { > 3d9d8af3 Rafał Miłecki 2012-07-05 368 bcma_info(bus, "Bridge found\n"); > e167d9fb Hauke Mehrtens 2012-03-15 369 return -ENXIO; > > :::::: The code at line 361 was first introduced by commit > :::::: aaa2ced15ad8dca8048666c9f70736424d696a6b bcma: fix error code handling on 64 Bit systems > > :::::: TO: Hauke Mehrtens <hauke@hauke-m.de> > :::::: CC: John W. Linville <linville@tuxdriver.com> > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, [auto build test WARNING on v4.7-rc6] [also build test WARNING on next-20160708] [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/Arvind-Yadav/ErrHandling-Make-IS_ERR_VALUE_U32-as-generic-API-to-avoid-IS_ERR_VALUE-abuses/20160709-235356 config: x86_64-randconfig-x007-201628 (attached as .config) compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/mod_devicetable.h:11, from include/linux/pci.h:20, from include/linux/bcma/bcma.h:4, from drivers/bcma/bcma_private.h:8, from drivers/bcma/scan.c:9: drivers/bcma/scan.c: In function 'bcma_get_next_core': include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/compiler.h:127:14: note: in expansion of macro 'likely_notrace' ______r = likely_notrace(x); \ ^~~~~~~~~~~~~~ include/linux/compiler.h:141:58: note: in expansion of macro '__branch_check__' # define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0)) ^~~~~~~~~~~~~~~~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/compiler.h:127:14: note: in expansion of macro 'likely_notrace' ______r = likely_notrace(x); \ ^~~~~~~~~~~~~~ include/linux/compiler.h:141:58: note: in expansion of macro '__branch_check__' # define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0)) ^~~~~~~~~~~~~~~~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:42: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:42: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:42: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:42: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:42: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/compiler.h:127:14: note: in expansion of macro 'likely_notrace' ______r = likely_notrace(x); \ ^~~~~~~~~~~~~~ include/linux/compiler.h:141:58: note: in expansion of macro '__branch_check__' # define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0)) ^~~~~~~~~~~~~~~~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:42: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/compiler.h:127:14: note: in expansion of macro 'likely_notrace' ______r = likely_notrace(x); \ ^~~~~~~~~~~~~~ include/linux/compiler.h:141:58: note: in expansion of macro '__branch_check__' # define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0)) ^~~~~~~~~~~~~~~~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:162:16: note: in definition of macro '__trace_if' ______r = !!(cond); \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:162:16: note: in definition of macro '__trace_if' ______r = !!(cond); \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:162:16: note: in definition of macro '__trace_if' ______r = !!(cond); \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:162:16: note: in definition of macro '__trace_if' ______r = !!(cond); \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:162:16: note: in definition of macro '__trace_if' ______r = !!(cond); \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/compiler.h:127:14: note: in expansion of macro 'likely_notrace' ______r = likely_notrace(x); \ ^~~~~~~~~~~~~~ include/linux/compiler.h:141:58: note: in expansion of macro '__branch_check__' # define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0)) ^~~~~~~~~~~~~~~~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:162:16: note: in definition of macro '__trace_if' ______r = !!(cond); \ ^~~~ >> drivers/bcma/scan.c:361:2: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/compiler.h:127:14: note: in expansion of macro 'likely_notrace' ______r = likely_notrace(x); \ ^~~~~~~~~~~~~~ include/linux/compiler.h:141:58: note: in expansion of macro '__branch_check__' # define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0)) ^~~~~~~~~~~~~~~~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:361:18: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ drivers/bcma/scan.c:365:3: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:365:19: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ drivers/bcma/scan.c:365:3: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:365:19: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ drivers/bcma/scan.c:365:3: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:365:19: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ drivers/bcma/scan.c:365:3: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:365:19: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ drivers/bcma/scan.c:365:3: note: in expansion of macro 'if' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~ include/linux/compiler.h:127:14: note: in expansion of macro 'likely_notrace' ______r = likely_notrace(x); \ ^~~~~~~~~~~~~~ include/linux/compiler.h:141:58: note: in expansion of macro '__branch_check__' # define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __branch_check__(x, 0)) ^~~~~~~~~~~~~~~~ include/linux/err.h:23:29: note: in expansion of macro 'unlikely' #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^~~~~~~~ drivers/bcma/scan.c:365:19: note: in expansion of macro 'IS_ERR_VALUE_U32' if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { ^~~~~~~~~~~~~~~~ include/linux/err.h:23:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] #define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ vim +/if +361 drivers/bcma/scan.c 517f43e5 Hauke Mehrtens 2011-07-23 345 )) { 517f43e5 Hauke Mehrtens 2011-07-23 346 bcma_erom_skip_component(bus, eromptr); 517f43e5 Hauke Mehrtens 2011-07-23 347 return -ENODEV; 517f43e5 Hauke Mehrtens 2011-07-23 348 } 517f43e5 Hauke Mehrtens 2011-07-23 349 8369ae33 Rafał Miłecki 2011-05-09 350 /* get & parse master ports */ 8369ae33 Rafał Miłecki 2011-05-09 351 for (i = 0; i < ports[0]; i++) { 4e0d8cc1 Dan Carpenter 2011-08-23 352 s32 mst_port_d = bcma_erom_get_mst_port(bus, eromptr); 982eee67 Hauke Mehrtens 2011-07-23 353 if (mst_port_d < 0) 982eee67 Hauke Mehrtens 2011-07-23 354 return -EILSEQ; 8369ae33 Rafał Miłecki 2011-05-09 355 } 8369ae33 Rafał Miłecki 2011-05-09 356 e167d9fb Hauke Mehrtens 2012-03-15 357 /* First Slave Address Descriptor should be port 0: e167d9fb Hauke Mehrtens 2012-03-15 358 * the main register space for the core e167d9fb Hauke Mehrtens 2012-03-15 359 */ e167d9fb Hauke Mehrtens 2012-03-15 360 tmp = bcma_erom_get_addr_desc(bus, eromptr, SCAN_ADDR_TYPE_SLAVE, 0); aaa2ced1 Hauke Mehrtens 2013-09-07 @361 if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { e167d9fb Hauke Mehrtens 2012-03-15 362 /* Try again to see if it is a bridge */ e167d9fb Hauke Mehrtens 2012-03-15 363 tmp = bcma_erom_get_addr_desc(bus, eromptr, e167d9fb Hauke Mehrtens 2012-03-15 364 SCAN_ADDR_TYPE_BRIDGE, 0); aaa2ced1 Hauke Mehrtens 2013-09-07 365 if (tmp == 0 || IS_ERR_VALUE_U32(tmp)) { e167d9fb Hauke Mehrtens 2012-03-15 366 return -EILSEQ; e167d9fb Hauke Mehrtens 2012-03-15 367 } else { 3d9d8af3 Rafał Miłecki 2012-07-05 368 bcma_info(bus, "Bridge found\n"); e167d9fb Hauke Mehrtens 2012-03-15 369 return -ENXIO; :::::: The code at line 361 was first introduced by commit :::::: aaa2ced15ad8dca8048666c9f70736424d696a6b bcma: fix error code handling on 64 Bit systems :::::: TO: Hauke Mehrtens <hauke@hauke-m.de> :::::: CC: John W. Linville <linville@tuxdriver.com> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c index 4a2d1b2..3bc77eb 100644 --- a/drivers/bcma/scan.c +++ b/drivers/bcma/scan.c @@ -272,7 +272,6 @@ static struct bcma_device *bcma_find_core_reverse(struct bcma_bus *bus, u16 core return NULL; } -#define IS_ERR_VALUE_U32(x) ((x) >= (u32)-MAX_ERRNO) static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr, struct bcma_device_id *match, int core_num, diff --git a/include/linux/err.h b/include/linux/err.h index 1e35588..1940af7 100644 --- a/include/linux/err.h +++ b/include/linux/err.h @@ -20,6 +20,8 @@ #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) +#define IS_ERR_VALUE_U32(x) unlikely((unsigned int)(void *)(x) >= (unsigned int)-MAX_ERRNO) + static inline void * __must_check ERR_PTR(long error) { return (void *) error;
IS_ERR_VALUE() assumes that its parameter is an unsigned long. It can not be used to check if an 'unsigned int' reflects an error. As they pass an 'unsigned int' into a function that takes an 'unsigned long' argument. This happens to work because the type is sign-extended on 64-bit architectures before it gets converted into an unsigned type. However, anything that passes an 'unsigned short' or 'unsigned int' argument into IS_ERR_VALUE() is guaranteed to be broken, as are 8-bit integers and types that are wider than 'unsigned long'. It would be nice to any users that are not passing 'unsigned int' arguments. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> --- drivers/bcma/scan.c | 1 - include/linux/err.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-)