All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
	David Miller <davem@davemloft.net>,
	Networking <netdev@vger.kernel.org>
Cc: Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	PowerPC <linuxppc-dev@lists.ozlabs.org>
Subject: Re: linux-next: build warning after merge of the net-next tree
Date: Sun, 10 Nov 2019 17:45:00 -0800	[thread overview]
Message-ID: <e71126d6-6c15-297d-0138-4c76d6720186@gmail.com> (raw)
In-Reply-To: <20191111123922.540319a2@canb.auug.org.au>



On 11/10/19 5:39 PM, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the net-next tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> In file included from ./arch/powerpc/include/generated/asm/local64.h:1,
>                  from include/linux/u64_stats_sync.h:72,
>                  from include/linux/cgroup-defs.h:20,
>                  from include/linux/cgroup.h:28,
>                  from include/linux/memcontrol.h:13,
>                  from include/linux/swap.h:9,
>                  from include/linux/suspend.h:5,
>                  from arch/powerpc/kernel/asm-offsets.c:23:
> include/linux/u64_stats_sync.h: In function 'u64_stats_read':
> include/asm-generic/local64.h:30:37: warning: passing argument 1 of 'local_read' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>    30 | #define local64_read(l)  local_read(&(l)->a)
>       |                                     ^~~~~~~
> include/linux/u64_stats_sync.h:80:9: note: in expansion of macro 'local64_read'
>    80 |  return local64_read(&p->v);
>       |         ^~~~~~~~~~~~
> In file included from include/asm-generic/local64.h:22,
>                  from ./arch/powerpc/include/generated/asm/local64.h:1,
>                  from include/linux/u64_stats_sync.h:72,
>                  from include/linux/cgroup-defs.h:20,
>                  from include/linux/cgroup.h:28,
>                  from include/linux/memcontrol.h:13,
>                  from include/linux/swap.h:9,
>                  from include/linux/suspend.h:5,
>                  from arch/powerpc/kernel/asm-offsets.c:23:
> arch/powerpc/include/asm/local.h:20:44: note: expected 'local_t *' {aka 'struct <anonymous> *'} but argument is of type 'const local_t *' {aka 'const struct <anonymous> *'}
>    20 | static __inline__ long local_read(local_t *l)
>       |                                   ~~~~~~~~~^
> 
> Introduced by commit
> 
>   316580b69d0a ("u64_stats: provide u64_stats_t type")
> 
> Powerpc folks: is there some reason that local_read() cannot take a
> const argument?
> 
> I have added this patch (which builds fine) for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 11 Nov 2019 12:32:24 +1100
> Subject: [PATCH] powerpc: local_read() should take a const local_t argument
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/powerpc/include/asm/local.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/include/asm/local.h b/arch/powerpc/include/asm/local.h
> index fdd00939270b..bc4bd19b7fc2 100644
> --- a/arch/powerpc/include/asm/local.h
> +++ b/arch/powerpc/include/asm/local.h
> @@ -17,7 +17,7 @@ typedef struct
>  
>  #define LOCAL_INIT(i)	{ (i) }
>  
> -static __inline__ long local_read(local_t *l)
> +static __inline__ long local_read(const local_t *l)
>  {
>  	return READ_ONCE(l->v);
>  }
> 

I have sent this patch two days ago, I do not believe I had any answer from ppc maintainers.

From 47c47befdcf31fb8498c9e630bb8e0dc3ef88079 Mon Sep 17 00:00:00 2001
From: Eric Dumazet <edumazet@google.com>
Date: Fri, 8 Nov 2019 06:04:35 -0800
Subject: [PATCH] powerpc: add const qual to local_read() parameter

A patch in net-next triggered a compile error on powerpc.

This seems reasonable to relax powerpc local_read() requirements.

Fixes: 316580b69d0a ("u64_stats: provide u64_stats_t type")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: kbuild test robot <lkp@intel.com>
Cc:	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc:	Paul Mackerras <paulus@samba.org>
Cc:	Michael Ellerman <mpe@ellerman.id.au>
Cc:	linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/include/asm/local.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/local.h b/arch/powerpc/include/asm/local.h
index fdd00939270bf08113b537a090d6a6e34a048361..bc4bd19b7fc235b80ec1132f44409b6fe1057975 100644
--- a/arch/powerpc/include/asm/local.h
+++ b/arch/powerpc/include/asm/local.h
@@ -17,7 +17,7 @@ typedef struct
 
 #define LOCAL_INIT(i)	{ (i) }
 
-static __inline__ long local_read(local_t *l)
+static __inline__ long local_read(const local_t *l)
 {
 	return READ_ONCE(l->v);
 }
-- 
2.24.0.432.g9d3f5f5b63-goog


WARNING: multiple messages have this Message-ID (diff)
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>,
	David Miller <davem@davemloft.net>,
	Networking <netdev@vger.kernel.org>
Cc: Eric Dumazet <edumazet@google.com>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	PowerPC <linuxppc-dev@lists.ozlabs.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: linux-next: build warning after merge of the net-next tree
Date: Sun, 10 Nov 2019 17:45:00 -0800	[thread overview]
Message-ID: <e71126d6-6c15-297d-0138-4c76d6720186@gmail.com> (raw)
In-Reply-To: <20191111123922.540319a2@canb.auug.org.au>



On 11/10/19 5:39 PM, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the net-next tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> In file included from ./arch/powerpc/include/generated/asm/local64.h:1,
>                  from include/linux/u64_stats_sync.h:72,
>                  from include/linux/cgroup-defs.h:20,
>                  from include/linux/cgroup.h:28,
>                  from include/linux/memcontrol.h:13,
>                  from include/linux/swap.h:9,
>                  from include/linux/suspend.h:5,
>                  from arch/powerpc/kernel/asm-offsets.c:23:
> include/linux/u64_stats_sync.h: In function 'u64_stats_read':
> include/asm-generic/local64.h:30:37: warning: passing argument 1 of 'local_read' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>    30 | #define local64_read(l)  local_read(&(l)->a)
>       |                                     ^~~~~~~
> include/linux/u64_stats_sync.h:80:9: note: in expansion of macro 'local64_read'
>    80 |  return local64_read(&p->v);
>       |         ^~~~~~~~~~~~
> In file included from include/asm-generic/local64.h:22,
>                  from ./arch/powerpc/include/generated/asm/local64.h:1,
>                  from include/linux/u64_stats_sync.h:72,
>                  from include/linux/cgroup-defs.h:20,
>                  from include/linux/cgroup.h:28,
>                  from include/linux/memcontrol.h:13,
>                  from include/linux/swap.h:9,
>                  from include/linux/suspend.h:5,
>                  from arch/powerpc/kernel/asm-offsets.c:23:
> arch/powerpc/include/asm/local.h:20:44: note: expected 'local_t *' {aka 'struct <anonymous> *'} but argument is of type 'const local_t *' {aka 'const struct <anonymous> *'}
>    20 | static __inline__ long local_read(local_t *l)
>       |                                   ~~~~~~~~~^
> 
> Introduced by commit
> 
>   316580b69d0a ("u64_stats: provide u64_stats_t type")
> 
> Powerpc folks: is there some reason that local_read() cannot take a
> const argument?
> 
> I have added this patch (which builds fine) for today:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 11 Nov 2019 12:32:24 +1100
> Subject: [PATCH] powerpc: local_read() should take a const local_t argument
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/powerpc/include/asm/local.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/include/asm/local.h b/arch/powerpc/include/asm/local.h
> index fdd00939270b..bc4bd19b7fc2 100644
> --- a/arch/powerpc/include/asm/local.h
> +++ b/arch/powerpc/include/asm/local.h
> @@ -17,7 +17,7 @@ typedef struct
>  
>  #define LOCAL_INIT(i)	{ (i) }
>  
> -static __inline__ long local_read(local_t *l)
> +static __inline__ long local_read(const local_t *l)
>  {
>  	return READ_ONCE(l->v);
>  }
> 

I have sent this patch two days ago, I do not believe I had any answer from ppc maintainers.

From 47c47befdcf31fb8498c9e630bb8e0dc3ef88079 Mon Sep 17 00:00:00 2001
From: Eric Dumazet <edumazet@google.com>
Date: Fri, 8 Nov 2019 06:04:35 -0800
Subject: [PATCH] powerpc: add const qual to local_read() parameter

A patch in net-next triggered a compile error on powerpc.

This seems reasonable to relax powerpc local_read() requirements.

Fixes: 316580b69d0a ("u64_stats: provide u64_stats_t type")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: kbuild test robot <lkp@intel.com>
Cc:	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc:	Paul Mackerras <paulus@samba.org>
Cc:	Michael Ellerman <mpe@ellerman.id.au>
Cc:	linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/include/asm/local.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/local.h b/arch/powerpc/include/asm/local.h
index fdd00939270bf08113b537a090d6a6e34a048361..bc4bd19b7fc235b80ec1132f44409b6fe1057975 100644
--- a/arch/powerpc/include/asm/local.h
+++ b/arch/powerpc/include/asm/local.h
@@ -17,7 +17,7 @@ typedef struct
 
 #define LOCAL_INIT(i)	{ (i) }
 
-static __inline__ long local_read(local_t *l)
+static __inline__ long local_read(const local_t *l)
 {
 	return READ_ONCE(l->v);
 }
-- 
2.24.0.432.g9d3f5f5b63-goog


  reply	other threads:[~2019-11-11  1:45 UTC|newest]

Thread overview: 164+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11  1:39 linux-next: build warning after merge of the net-next tree Stephen Rothwell
2019-11-11  1:39 ` Stephen Rothwell
2019-11-11  1:45 ` Eric Dumazet [this message]
2019-11-11  1:45   ` Eric Dumazet
  -- strict thread matches above, loose matches on Subject: below --
2024-03-12  4:33 Stephen Rothwell
2024-03-12 14:45 ` Jakub Kicinski
2024-03-12 21:14   ` Stephen Rothwell
2024-03-12  4:30 Stephen Rothwell
2023-11-23  2:45 Stephen Rothwell
2023-11-23  4:04 ` Jakub Kicinski
2023-08-29  4:20 Stephen Rothwell
2023-08-29  8:43 ` Donald Hunter
2023-07-20  4:16 Stephen Rothwell
2023-06-19  5:41 Arinzon, David
2023-06-19  4:40 Stephen Rothwell
2022-12-13  4:37 Stephen Rothwell
2022-08-25  5:41 Stephen Rothwell
2022-08-23  3:49 Stephen Rothwell
2022-05-17  1:03 Stephen Rothwell
2022-05-17  9:03 ` Stephen Rothwell
2022-05-17 11:25   ` Florian Westphal
2022-05-18 22:52     ` Stephen Rothwell
2022-05-02 21:34 Stephen Rothwell
2022-04-21  7:07 Stephen Rothwell
2022-04-21  7:29 ` Pavel Pisa
2022-04-21  7:39   ` Marc Kleine-Budde
2022-03-03  9:13 Stephen Rothwell
2022-03-03  9:15 ` Stephen Rothwell
2022-03-03  9:44   ` dust.li
2022-03-01  9:13 Stephen Rothwell
2022-01-06 15:57 Stephen Rothwell
2022-01-07  0:41 ` Saeed Mahameed
2021-11-17  2:55 Stephen Rothwell
2021-11-17  3:05 ` Eric Dumazet
2021-11-17  2:52 Stephen Rothwell
2021-10-27 11:07 Stephen Rothwell
2021-10-27 11:34 ` Russell King (Oracle)
2021-10-30  2:10   ` Randy Dunlap
2021-10-26  9:20 Stephen Rothwell
2021-06-15 11:30 Stephen Rothwell
2021-06-11  3:24 Stephen Rothwell
2021-06-11 16:06 ` Lijun Pan
2021-03-26  8:46 Stephen Rothwell
2021-03-25  6:23 Stephen Rothwell
2021-03-25  6:40 ` Stephen Rothwell
2021-03-22  6:04 Stephen Rothwell
2021-03-18  5:47 Stephen Rothwell
2021-03-17  7:56 Stephen Rothwell
2021-03-17  8:21 ` Chen Yu
2021-03-17  7:51 Stephen Rothwell
2021-03-17  7:49 Stephen Rothwell
2021-02-01  6:59 Stephen Rothwell
2021-01-18 19:48 Stephen Rothwell
2020-11-26  6:40 Stephen Rothwell
2020-12-14 20:01 ` Stephen Rothwell
2020-12-15  7:43   ` Ioana Ciornei
2020-11-18  5:19 Stephen Rothwell
2020-11-18 12:47 ` Xie He
2020-09-08  3:00 Stephen Rothwell
2020-09-08  3:49 ` Jakub Kicinski
2020-07-07  7:06 Stephen Rothwell
2020-07-07  7:21 ` Vaibhav Gupta
2020-06-02  2:17 Stephen Rothwell
2020-06-04  1:22 ` Stephen Rothwell
2020-05-25 12:40 Stephen Rothwell
2020-05-27  1:15 ` Kirsher, Jeffrey T
2020-06-13  1:16   ` Stephen Rothwell
2020-06-13  1:19     ` Kirsher, Jeffrey T
2020-03-13  9:54 Stephen Rothwell
2020-03-13 10:44 ` Александр Берсенев
2020-03-13 18:21   ` David Miller
2020-03-13 21:42     ` Александр Берсенев
2020-02-26  2:41 Stephen Rothwell
2020-02-24 22:27 Stephen Rothwell
2020-02-24 22:42 ` David Miller
2020-02-24 22:47   ` Stephen Rothwell
2020-02-25  0:14     ` Varghese, Martin (Nokia - IN/Bangalore)
2020-02-25 22:58   ` Stephen Rothwell
2019-11-21  7:34 Stephen Rothwell
2019-11-11  1:19 Stephen Rothwell
2019-11-11 10:24 ` Russell King - ARM Linux admin
2019-10-07 22:42 Stephen Rothwell
2019-10-09 12:24 ` David Howells
2019-07-08  3:25 Stephen Rothwell
2019-05-23 23:47 Stephen Rothwell
2019-04-23  1:32 Stephen Rothwell
2019-04-16  1:20 Stephen Rothwell
2019-04-16 10:03 ` John Hurley
2019-03-21 23:05 Stephen Rothwell
2019-03-21 23:10 ` Florian Fainelli
2019-02-22  1:06 Stephen Rothwell
2019-02-22  1:10 ` Florian Fainelli
2019-02-13  0:51 Stephen Rothwell
2019-02-13  0:58 ` Florian Fainelli
2019-02-13  0:49 Stephen Rothwell
2019-02-13  0:57 ` Florian Fainelli
2019-02-03 23:44 Stephen Rothwell
2019-02-04  4:26 ` David Miller
2019-02-04  4:32   ` Stephen Rothwell
2018-11-29  0:24 Stephen Rothwell
2018-12-19  2:42 ` Stephen Rothwell
2018-12-19  3:07   ` Gustavo A. R. Silva
2018-12-19  3:07     ` Gustavo A. R. Silva
2018-12-19  5:37     ` Stephen Rothwell
2018-07-19  2:04 Stephen Rothwell
2018-07-19  3:52 ` Guenter Roeck
2018-07-19  5:29   ` Stephen Rothwell
2018-07-19 13:49     ` Guenter Roeck
2018-07-19 22:09       ` Stephen Rothwell
2018-07-19 22:35         ` Guenter Roeck
2018-07-19 23:19           ` Masahiro Yamada
2018-07-19 23:37             ` Guenter Roeck
2018-08-14  7:05             ` Masahiro Yamada
2018-08-14 13:28               ` Guenter Roeck
2018-07-20  1:06           ` Stephen Rothwell
2018-07-19  1:40 Stephen Rothwell
2018-07-20 20:31 ` Linus Walleij
2018-07-05 23:56 Stephen Rothwell
2018-07-07 11:30 ` David Miller
2018-07-07 12:03   ` Stephen Rothwell
2018-05-29  3:10 Stephen Rothwell
2018-03-13  6:11 Stephen Rothwell
2018-03-13 11:46 ` Gustavo A. R. Silva
2018-03-13 15:33   ` David Miller
2018-03-13 20:28     ` Gustavo A. R. Silva
2018-01-18  1:20 Stephen Rothwell
2017-12-04  0:02 Stephen Rothwell
2017-12-04  6:33 ` Heiner Kallweit
2017-12-04 18:21 ` David Miller
2017-11-15  5:01 Stephen Rothwell
2017-11-15  5:01 ` Stephen Rothwell
2016-12-09  0:34 Stephen Rothwell
2016-11-16  0:36 Stephen Rothwell
2016-11-16  0:56 ` Martin KaFai Lau
2016-11-16  0:56   ` Martin KaFai Lau
2016-07-27  6:15 Stephen Rothwell
2016-07-27  6:15 ` Stephen Rothwell
2016-07-27  6:19 ` David Miller
2016-07-27  6:35   ` Stephen Rothwell
2016-07-27  6:45     ` Iyappan Subramanian
2016-07-11  6:13 Stephen Rothwell
2016-07-11  6:13 ` Stephen Rothwell
2016-07-11  8:16 ` Simon Horman
2016-07-04  3:15 Stephen Rothwell
2016-07-04  3:15 ` Stephen Rothwell
2016-07-04  5:19 ` Jason Wang
2016-02-15  2:09 Stephen Rothwell
2016-02-15  2:09 ` Stephen Rothwell
2016-02-15  8:01 ` Nikolay Borisov
2014-05-15  6:47 Stephen Rothwell
2014-05-15  6:47 ` Stephen Rothwell
2014-05-15 17:39 ` Cong Wang
2014-05-15 17:43   ` David Miller
2014-05-15 18:36     ` Cong Wang
2014-01-06  4:53 Stephen Rothwell
2014-01-06  4:53 ` Stephen Rothwell
2013-08-21  9:10 Stephen Rothwell
2013-08-21  9:10 ` Stephen Rothwell
2013-08-21 18:15 ` David Miller
2013-02-18  6:00 Stephen Rothwell
2013-02-18  6:00 ` Stephen Rothwell
2012-04-23  6:54 Stephen Rothwell
2012-04-23  6:54 ` Stephen Rothwell
2012-04-23  7:22 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e71126d6-6c15-297d-0138-4c76d6720186@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=netdev@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.