linux-next: build warning after merge of the mmc-uh tree
Hi Ulf,
After merging the mmc-uh tree, today's linux-next build (x86_64 allmodconfig) produced this warning:
In file included from include/linux/err.h:4:0,
from drivers/mmc/core/mmc.c:13:
drivers/mmc/core/mmc.c: In function 'mmc_select_hs400es':
include/linux/err.h:21:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
^
include/linux/compiler.h:170:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
drivers/mmc/core/mmc.c:1244:6: note: in expansion of macro 'IS_ERR_VALUE'
if (IS_ERR_VALUE(err))
^Introduced by commit
8141f0ace818 ("mmc: core: implement enhanced strobe support")
I think error values now must be "long".
Signature · 2 lines
Cheers, Stephen Rothwell
Hi Stephen,
Quoted 6 lines · Stephen Rothwell
Hi Ulf,
After merging the mmc-uh tree, today's linux-next build (
x86_64allmodconfig) produced this warning:In file included from
include/linux/err.h:4:0,
Quoted 11 lines
from drivers/mmc/core/mmc.c:13:
drivers/mmc/core/mmc.c: In function 'mmc_select_hs400es':
include/linux/err.h:21:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
^
include/linux/compiler.h:170:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
drivers/mmc/core/mmc.c:1244:6: note: in expansion of macro 'IS_ERR_VALUE'
if (IS_ERR_VALUE(err))
^Yup, sorry for this noise. Arnd had removed a lot of IS_ERR_VALUE abuses, but I forgot to amend this one.
Hi Ulf,
Should I come up with a new fix or you could manually amend it from "IS_ERR_VALUE(err)" to "err < 0"? :)
Quoted 7 lines
Introduced by commit
8141f0ace818("mmc: core: implement enhanced strobe support")I think error values now must be "long".
Signature · 2 lines
Best Regards Shawn Lin
Quoted 25 lines · Shawn Lin
Hi Stephen,
Quoted 13 lines · Stephen Rothwell
Hi Ulf,
After merging the mmc-uh tree, today's linux-next build (
x86_64allmodconfig) produced this warning:In file included from
include/linux/err.h:4:0,from drivers/mmc/core/mmc.c:13:
drivers/mmc/core/mmc.c: In function 'mmc_select_hs400es':include/linux/err.h:21:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#defineIS_ERR_VALUE(x)unlikely((unsigned long)(void *)(x) >= (unsigned
long)-MAX_ERRNO)Quoted 7 lines
^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/mmc/core/mmc.c:1244:6: note: in expansion of macro 'IS_ERR_VALUE' if (IS_ERR_VALUE(err)) ^
Quoted 16 lines
Yup, sorry for this noise. Arnd had removed a lot of
IS_ERR_VALUEabuses, but I forgot to amend this one.Hi Ulf,
Should I come up with a new fix or you could manually amend it from "
IS_ERR_VALUE(err)" to "err < 0"? :)Quoted 7 lines
Introduced by commit
8141f0ace818("mmc: core: implement enhanced strobe support")I think error values now must be "long".
Thanks for reporting and fixing!
I have amended the commit above and published the change on my next branch.
Kind regards
Uffe