* [PATCH] percpu: cleanup PER_CPU_DEF_ATTRIBUTES macro
@ 2018-08-21 13:40 Alexander Pateenok
2018-08-21 13:40 ` Alexander Pateenok
2018-08-21 15:56 ` Tejun Heo
0 siblings, 2 replies; 4+ messages in thread
From: Alexander Pateenok @ 2018-08-21 13:40 UTC (permalink / raw)
To: Arnd Bergmann, Tejun Heo, Christoph Lameter, Dennis Zhou,
linux-arch, linux-kernel
The macro is not used:
$ grep -r PER_CPU_DEF_ATTRIBUTES
include/linux/percpu-defs.h: __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak \
include/linux/percpu-defs.h: __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES \
include/asm-generic/percpu.h:#ifndef PER_CPU_DEF_ATTRIBUTES
include/asm-generic/percpu.h:#define PER_CPU_DEF_ATTRIBUTES
It was added with b01e8dc34379 ("alpha: fix percpu build breakage") and
removed in 2009 with b01e8dc34379..6088464cf1ae.
Signed-off-by: Alexander Pateenok <pateenoc@gmail.com>
---
include/asm-generic/percpu.h | 4 ----
include/linux/percpu-defs.h | 6 ++----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
index 1817a8415a5e..c2de013b2cf4 100644
--- a/include/asm-generic/percpu.h
+++ b/include/asm-generic/percpu.h
@@ -62,10 +62,6 @@ extern void setup_per_cpu_areas(void);
#define PER_CPU_ATTRIBUTES
#endif
-#ifndef PER_CPU_DEF_ATTRIBUTES
-#define PER_CPU_DEF_ATTRIBUTES
-#endif
-
#define raw_cpu_generic_read(pcp) \
({ \
*raw_cpu_ptr(&(pcp)); \
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h
index 2d2096ba1cfe..1ce8e264a269 100644
--- a/include/linux/percpu-defs.h
+++ b/include/linux/percpu-defs.h
@@ -91,8 +91,7 @@
extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \
__PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \
extern __PCPU_ATTRS(sec) __typeof__(type) name; \
- __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak \
- __typeof__(type) name
+ __PCPU_ATTRS(sec) __weak __typeof__(type) name
#else
/*
* Normal declaration and definition macros.
@@ -101,8 +100,7 @@
extern __PCPU_ATTRS(sec) __typeof__(type) name
#define DEFINE_PER_CPU_SECTION(type, name, sec) \
- __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES \
- __typeof__(type) name
+ __PCPU_ATTRS(sec) __typeof__(type) name
#endif
/*
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] percpu: cleanup PER_CPU_DEF_ATTRIBUTES macro
2018-08-21 13:40 [PATCH] percpu: cleanup PER_CPU_DEF_ATTRIBUTES macro Alexander Pateenok
@ 2018-08-21 13:40 ` Alexander Pateenok
2018-08-21 15:56 ` Tejun Heo
1 sibling, 0 replies; 4+ messages in thread
From: Alexander Pateenok @ 2018-08-21 13:40 UTC (permalink / raw)
To: Arnd Bergmann, Tejun Heo, Christoph Lameter, Dennis Zhou,
linux-arch, linux-kernel
The macro is not used:
$ grep -r PER_CPU_DEF_ATTRIBUTES
include/linux/percpu-defs.h: __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak \
include/linux/percpu-defs.h: __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES \
include/asm-generic/percpu.h:#ifndef PER_CPU_DEF_ATTRIBUTES
include/asm-generic/percpu.h:#define PER_CPU_DEF_ATTRIBUTES
It was added with b01e8dc34379 ("alpha: fix percpu build breakage") and
removed in 2009 with b01e8dc34379..6088464cf1ae.
Signed-off-by: Alexander Pateenok <pateenoc@gmail.com>
---
include/asm-generic/percpu.h | 4 ----
include/linux/percpu-defs.h | 6 ++----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
index 1817a8415a5e..c2de013b2cf4 100644
--- a/include/asm-generic/percpu.h
+++ b/include/asm-generic/percpu.h
@@ -62,10 +62,6 @@ extern void setup_per_cpu_areas(void);
#define PER_CPU_ATTRIBUTES
#endif
-#ifndef PER_CPU_DEF_ATTRIBUTES
-#define PER_CPU_DEF_ATTRIBUTES
-#endif
-
#define raw_cpu_generic_read(pcp) \
({ \
*raw_cpu_ptr(&(pcp)); \
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h
index 2d2096ba1cfe..1ce8e264a269 100644
--- a/include/linux/percpu-defs.h
+++ b/include/linux/percpu-defs.h
@@ -91,8 +91,7 @@
extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \
__PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \
extern __PCPU_ATTRS(sec) __typeof__(type) name; \
- __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak \
- __typeof__(type) name
+ __PCPU_ATTRS(sec) __weak __typeof__(type) name
#else
/*
* Normal declaration and definition macros.
@@ -101,8 +100,7 @@
extern __PCPU_ATTRS(sec) __typeof__(type) name
#define DEFINE_PER_CPU_SECTION(type, name, sec) \
- __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES \
- __typeof__(type) name
+ __PCPU_ATTRS(sec) __typeof__(type) name
#endif
/*
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] percpu: cleanup PER_CPU_DEF_ATTRIBUTES macro
2018-08-21 13:40 [PATCH] percpu: cleanup PER_CPU_DEF_ATTRIBUTES macro Alexander Pateenok
2018-08-21 13:40 ` Alexander Pateenok
@ 2018-08-21 15:56 ` Tejun Heo
2018-08-21 15:56 ` Tejun Heo
1 sibling, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2018-08-21 15:56 UTC (permalink / raw)
To: Alexander Pateenok
Cc: Arnd Bergmann, Christoph Lameter, Dennis Zhou, linux-arch,
linux-kernel
Hello,
On Tue, Aug 21, 2018 at 04:40:30PM +0300, Alexander Pateenok wrote:
> The macro is not used:
>
> $ grep -r PER_CPU_DEF_ATTRIBUTES
> include/linux/percpu-defs.h: __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak \
> include/linux/percpu-defs.h: __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES \
> include/asm-generic/percpu.h:#ifndef PER_CPU_DEF_ATTRIBUTES
> include/asm-generic/percpu.h:#define PER_CPU_DEF_ATTRIBUTES
>
> It was added with b01e8dc34379 ("alpha: fix percpu build breakage") and
> removed in 2009 with b01e8dc34379..6088464cf1ae.
>
> Signed-off-by: Alexander Pateenok <pateenoc@gmail.com>
I'm not sure this is a meaningful cleanup, but then again, why not?
Can you please repost the patch to Andrew so that it can go through
-mm tree? Please feel free to add
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] percpu: cleanup PER_CPU_DEF_ATTRIBUTES macro
2018-08-21 15:56 ` Tejun Heo
@ 2018-08-21 15:56 ` Tejun Heo
0 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2018-08-21 15:56 UTC (permalink / raw)
To: Alexander Pateenok
Cc: Arnd Bergmann, Christoph Lameter, Dennis Zhou, linux-arch,
linux-kernel
Hello,
On Tue, Aug 21, 2018 at 04:40:30PM +0300, Alexander Pateenok wrote:
> The macro is not used:
>
> $ grep -r PER_CPU_DEF_ATTRIBUTES
> include/linux/percpu-defs.h: __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak \
> include/linux/percpu-defs.h: __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES \
> include/asm-generic/percpu.h:#ifndef PER_CPU_DEF_ATTRIBUTES
> include/asm-generic/percpu.h:#define PER_CPU_DEF_ATTRIBUTES
>
> It was added with b01e8dc34379 ("alpha: fix percpu build breakage") and
> removed in 2009 with b01e8dc34379..6088464cf1ae.
>
> Signed-off-by: Alexander Pateenok <pateenoc@gmail.com>
I'm not sure this is a meaningful cleanup, but then again, why not?
Can you please repost the patch to Andrew so that it can go through
-mm tree? Please feel free to add
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-08-21 19:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-21 13:40 [PATCH] percpu: cleanup PER_CPU_DEF_ATTRIBUTES macro Alexander Pateenok
2018-08-21 13:40 ` Alexander Pateenok
2018-08-21 15:56 ` Tejun Heo
2018-08-21 15:56 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).