Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1414550 > unrolled thread

linux-next: build warning after merge of the mmc-uh tree

Started byStephen Rothwell <sfr@canb.auug.org.au>
First post2016-06-06 03:40 +0200
Last post2016-06-07 23:50 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  linux-next: build warning after merge of the mmc-uh tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-06-06 03:40 +0200
    Re: linux-next: build warning after merge of the mmc-uh tree Shawn Lin <shawn.lin@rock-chips.com> - 2016-06-06 04:00 +0200
      Re: linux-next: build warning after merge of the mmc-uh tree Ulf Hansson <ulf.hansson@linaro.org> - 2016-06-07 23:50 +0200

#1414550 — linux-next: build warning after merge of the mmc-uh tree

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2016-06-06 03:40 +0200
Subjectlinux-next: build warning after merge of the mmc-uh tree
Message-ID<rGRGi-5ZR-9@gated-at.bofh.it>
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".

-- 
Cheers,
Stephen Rothwell

[toc] | [next] | [standalone]


#1414556

FromShawn Lin <shawn.lin@rock-chips.com>
Date2016-06-06 04:00 +0200
Message-ID<rGRZD-67c-15@gated-at.bofh.it>
In reply to#1414550
Hi Stephen,

On 2016/6/6 9:38, Stephen Rothwell wrote:
> 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))
>       ^

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"? :)

>
> Introduced by commit
>
>   8141f0ace818 ("mmc: core: implement enhanced strobe support")
>
> I think error values now must be "long".
>


-- 
Best Regards
Shawn Lin

[toc] | [prev] | [next] | [standalone]


#1416654

FromUlf Hansson <ulf.hansson@linaro.org>
Date2016-06-07 23:50 +0200
Message-ID<rHx2O-82s-25@gated-at.bofh.it>
In reply to#1414556
On 6 June 2016 at 03:51, Shawn Lin <shawn.lin@rock-chips.com> wrote:
> Hi Stephen,
>
> On 2016/6/6 9:38, Stephen Rothwell wrote:
>>
>> 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))
>>       ^
>
>
> 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"? :)
>
>>
>> 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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web