Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1390802 > unrolled thread
| Started by | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| First post | 2016-04-29 08:50 +0200 |
| Last post | 2016-04-30 08:00 +0200 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
linux-next: build warning after merge of the akpm-current tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-04-29 08:50 +0200
Re: linux-next: build warning after merge of the akpm-current tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-04-29 09:00 +0200
Re: linux-next: build warning after merge of the akpm-current tree Josh Poimboeuf <jpoimboe@redhat.com> - 2016-04-29 15:40 +0200
Re: linux-next: build warning after merge of the akpm-current tree Josh Poimboeuf <jpoimboe@redhat.com> - 2016-04-29 16:10 +0200
Re: linux-next: build warning after merge of the akpm-current tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-04-30 08:00 +0200
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-04-29 08:50 +0200 |
| Subject | linux-next: build warning after merge of the akpm-current tree |
| Message-ID | <rtaps-1qB-3@gated-at.bofh.it> |
Hi Andrew,
After merging the akpm-current tree, today's linux-next build (x86_64
allmodconfig) produced this warning:
drivers/scsi/ipr.c: In function 'ipr_show_device_id':
drivers/scsi/ipr.c:4462:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
len = snprintf(buf, PAGE_SIZE, "0x%llx\n", be64_to_cpu(res->dev_id));
^
Lots and lots like this :-(
Probably introduced by commit
eef17fb79096 ("byteswap: try to avoid __builtin_constant_p gcc bug")
I guess __builtin_bswap64() has type "unsigned long int" :-(
--
Cheers,
Stephen Rothwell
[toc] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-04-29 09:00 +0200 |
| Message-ID | <rtaz9-1u8-19@gated-at.bofh.it> |
| In reply to | #1390802 |
Hi All,
On Fri, 29 Apr 2016 16:45:43 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/scsi/ipr.c: In function 'ipr_show_device_id':
> drivers/scsi/ipr.c:4462:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
> len = snprintf(buf, PAGE_SIZE, "0x%llx\n", be64_to_cpu(res->dev_id));
> ^
>
> Lots and lots like this :-(
>
> Introduced by commit
>
> eef17fb79096 ("byteswap: try to avoid __builtin_constant_p gcc bug")
>
> I guess __builtin_bswap64() has type "unsigned long int" :-(
So, I have reverted that commit for today ... it produces too many
warnings :-(
--
Cheers,
Stephen Rothwell
[toc] | [prev] | [next] | [standalone]
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Date | 2016-04-29 15:40 +0200 |
| Message-ID | <rtgOg-6Lx-43@gated-at.bofh.it> |
| In reply to | #1390802 |
On Fri, Apr 29, 2016 at 04:45:43PM +1000, Stephen Rothwell wrote:
> Hi Andrew,
>
> After merging the akpm-current tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
>
> drivers/scsi/ipr.c: In function 'ipr_show_device_id':
> drivers/scsi/ipr.c:4462:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
> len = snprintf(buf, PAGE_SIZE, "0x%llx\n", be64_to_cpu(res->dev_id));
> ^
>
> Lots and lots like this :-(
>
> Probably introduced by commit
>
> eef17fb79096 ("byteswap: try to avoid __builtin_constant_p gcc bug")
>
> I guess __builtin_bswap64() has type "unsigned long int" :-(
Hm, I suppose this is cross-compiled on a powerpc host?
We probably need to add a (__u64) cast to the return value of
__builtin_bswap64(), like:
diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
index de56fd5..d737804 100644
--- a/include/uapi/linux/swab.h
+++ b/include/uapi/linux/swab.h
@@ -123,7 +123,7 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val)
* @x: value to byteswap
*/
#ifdef __HAVE_BUILTIN_BSWAP64__
-#define __swab64(x) __builtin_bswap64((__u64)(x))
+#define __swab64(x) (__u64)__builtin_bswap64((__u64)(x))
#else
#define __swab64(x) \
(__builtin_constant_p((__u64)(x)) ? \
--
Josh
[toc] | [prev] | [next] | [standalone]
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Date | 2016-04-29 16:10 +0200 |
| Message-ID | <rthhg-7lH-27@gated-at.bofh.it> |
| In reply to | #1391154 |
On Fri, Apr 29, 2016 at 08:32:19AM -0500, Josh Poimboeuf wrote:
> On Fri, Apr 29, 2016 at 04:45:43PM +1000, Stephen Rothwell wrote:
> > Hi Andrew,
> >
> > After merging the akpm-current tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> >
> > drivers/scsi/ipr.c: In function 'ipr_show_device_id':
> > drivers/scsi/ipr.c:4462:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
> > len = snprintf(buf, PAGE_SIZE, "0x%llx\n", be64_to_cpu(res->dev_id));
> > ^
> >
> > Lots and lots like this :-(
> >
> > Probably introduced by commit
> >
> > eef17fb79096 ("byteswap: try to avoid __builtin_constant_p gcc bug")
> >
> > I guess __builtin_bswap64() has type "unsigned long int" :-(
>
> Hm, I suppose this is cross-compiled on a powerpc host?
>
> We probably need to add a (__u64) cast to the return value of
> __builtin_bswap64(), like:
>
> diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
> index de56fd5..d737804 100644
> --- a/include/uapi/linux/swab.h
> +++ b/include/uapi/linux/swab.h
> @@ -123,7 +123,7 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val)
> * @x: value to byteswap
> */
> #ifdef __HAVE_BUILTIN_BSWAP64__
> -#define __swab64(x) __builtin_bswap64((__u64)(x))
> +#define __swab64(x) (__u64)__builtin_bswap64((__u64)(x))
> #else
> #define __swab64(x) \
> (__builtin_constant_p((__u64)(x)) ? \
Never mind about cross-compiling on powerpc, this has nothing to do with
that. But the above patch does seem to fix it.
--
Josh
[toc] | [prev] | [next] | [standalone]
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2016-04-30 08:00 +0200 |
| Message-ID | <rtw6B-2xk-1@gated-at.bofh.it> |
| In reply to | #1391182 |
Hi Josh,
On Fri, 29 Apr 2016 09:03:42 -0500 Josh Poimboeuf <jpoimboe@redhat.com> wrote:
>
> On Fri, Apr 29, 2016 at 08:32:19AM -0500, Josh Poimboeuf wrote:
> > On Fri, Apr 29, 2016 at 04:45:43PM +1000, Stephen Rothwell wrote:
> > > Hi Andrew,
> > >
> > > After merging the akpm-current tree, today's linux-next build (x86_64
> > > allmodconfig) produced this warning:
> > >
> > > drivers/scsi/ipr.c: In function 'ipr_show_device_id':
> > > drivers/scsi/ipr.c:4462:34: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
> > > len = snprintf(buf, PAGE_SIZE, "0x%llx\n", be64_to_cpu(res->dev_id));
> > > ^
> > >
> > > Lots and lots like this :-(
> > >
> > > Probably introduced by commit
> > >
> > > eef17fb79096 ("byteswap: try to avoid __builtin_constant_p gcc bug")
> > >
> > > I guess __builtin_bswap64() has type "unsigned long int" :-(
> >
> > Hm, I suppose this is cross-compiled on a powerpc host?
> >
> > We probably need to add a (__u64) cast to the return value of
> > __builtin_bswap64(), like:
> >
> > diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
> > index de56fd5..d737804 100644
> > --- a/include/uapi/linux/swab.h
> > +++ b/include/uapi/linux/swab.h
> > @@ -123,7 +123,7 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val)
> > * @x: value to byteswap
> > */
> > #ifdef __HAVE_BUILTIN_BSWAP64__
> > -#define __swab64(x) __builtin_bswap64((__u64)(x))
> > +#define __swab64(x) (__u64)__builtin_bswap64((__u64)(x))
> > #else
> > #define __swab64(x) \
> > (__builtin_constant_p((__u64)(x)) ? \
>
>
> Never mind about cross-compiling on powerpc, this has nothing to do with
> that. But the above patch does seem to fix it.
Thanks. I have added Andrew's tidied up version to linux-next to
replace the revert.
--
Cheers,
Stephen Rothwell
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web