All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] arm64: vdso: correct definition of macro vdso_clocksource_ok
@ 2021-04-10 18:11 ` Edmundo Carmona Antoranz
  0 siblings, 0 replies; 8+ messages in thread
From: Edmundo Carmona Antoranz @ 2021-04-10 18:11 UTC (permalink / raw)
  To: catalin.marinas, will, avagin, 0x7f454c46, mark.rutland, maz,
	tglx, linux-arm-kernel
  Cc: kernel-janitors, Edmundo Carmona Antoranz

The macro vdso_clocksource_ok is shadowing a function with the same
name and so it actually makes no difference to have the macro defined
or not. Take a hint from x86, rename the function to have the
arch_ prefix and correct the definition of the macro.

Signed-off-by: Edmundo Carmona Antoranz <eantoranz@gmail.com>
---
 arch/arm64/include/asm/vdso/compat_gettimeofday.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
index 7508b0ac1d21..055d9e42a05d 100644
--- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
+++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
@@ -166,11 +166,11 @@ static __always_inline const struct vdso_data *__arch_get_timens_vdso_data(void)
 }
 #endif
 
-static inline bool vdso_clocksource_ok(const struct vdso_data *vd)
+static inline bool arch_vdso_clocksource_ok(const struct vdso_data *vd)
 {
 	return vd->clock_mode == VDSO_CLOCKMODE_ARCHTIMER;
 }
-#define vdso_clocksource_ok	vdso_clocksource_ok
+#define vdso_clocksource_ok arch_vdso_clocksource_ok
 
 #endif /* !__ASSEMBLY__ */
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH -next] arm64: vdso: correct definition of macro vdso_clocksource_ok
@ 2021-04-10 18:11 ` Edmundo Carmona Antoranz
  0 siblings, 0 replies; 8+ messages in thread
From: Edmundo Carmona Antoranz @ 2021-04-10 18:11 UTC (permalink / raw)
  To: catalin.marinas, will, avagin, 0x7f454c46, mark.rutland, maz,
	tglx, linux-arm-kernel
  Cc: kernel-janitors, Edmundo Carmona Antoranz

The macro vdso_clocksource_ok is shadowing a function with the same
name and so it actually makes no difference to have the macro defined
or not. Take a hint from x86, rename the function to have the
arch_ prefix and correct the definition of the macro.

Signed-off-by: Edmundo Carmona Antoranz <eantoranz@gmail.com>
---
 arch/arm64/include/asm/vdso/compat_gettimeofday.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/include/asm/vdso/compat_gettimeofday.h b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
index 7508b0ac1d21..055d9e42a05d 100644
--- a/arch/arm64/include/asm/vdso/compat_gettimeofday.h
+++ b/arch/arm64/include/asm/vdso/compat_gettimeofday.h
@@ -166,11 +166,11 @@ static __always_inline const struct vdso_data *__arch_get_timens_vdso_data(void)
 }
 #endif
 
-static inline bool vdso_clocksource_ok(const struct vdso_data *vd)
+static inline bool arch_vdso_clocksource_ok(const struct vdso_data *vd)
 {
 	return vd->clock_mode == VDSO_CLOCKMODE_ARCHTIMER;
 }
-#define vdso_clocksource_ok	vdso_clocksource_ok
+#define vdso_clocksource_ok arch_vdso_clocksource_ok
 
 #endif /* !__ASSEMBLY__ */
 
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH -next] arm64: vdso: correct definition of macro vdso_clocksource_ok
  2021-04-10 18:11 ` Edmundo Carmona Antoranz
@ 2021-04-10 19:03   ` Marc Zyngier
  -1 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2021-04-10 19:03 UTC (permalink / raw)
  To: Edmundo Carmona Antoranz
  Cc: catalin.marinas, will, avagin, 0x7f454c46, mark.rutland, tglx,
	linux-arm-kernel, kernel-janitors

Hi Edmundo,

On Sat, 10 Apr 2021 19:11:17 +0100,
Edmundo Carmona Antoranz <eantoranz@gmail.com> wrote:
> 
> The macro vdso_clocksource_ok is shadowing a function with the same
> name and so it actually makes no difference to have the macro defined
> or not.

No difference? Have you simply tried removing the macro and witness
the effect? If it made no difference, why have the macro at all then?

Also, run this, for example:

git grep '^\#define' arch/arm64/include/asm/| awk '$2 == $3 { print }'

Are you going to "fix" these too?

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH -next] arm64: vdso: correct definition of macro vdso_clocksource_ok
@ 2021-04-10 19:03   ` Marc Zyngier
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2021-04-10 19:03 UTC (permalink / raw)
  To: Edmundo Carmona Antoranz
  Cc: catalin.marinas, will, avagin, 0x7f454c46, mark.rutland, tglx,
	linux-arm-kernel, kernel-janitors

Hi Edmundo,

On Sat, 10 Apr 2021 19:11:17 +0100,
Edmundo Carmona Antoranz <eantoranz@gmail.com> wrote:
> 
> The macro vdso_clocksource_ok is shadowing a function with the same
> name and so it actually makes no difference to have the macro defined
> or not.

No difference? Have you simply tried removing the macro and witness
the effect? If it made no difference, why have the macro at all then?

Also, run this, for example:

git grep '^\#define' arch/arm64/include/asm/| awk '$2 == $3 { print }'

Are you going to "fix" these too?

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH -next] arm64: vdso: correct definition of macro vdso_clocksource_ok
  2021-04-10 19:03   ` Marc Zyngier
@ 2021-04-10 19:58     ` Edmundo Carmona Antoranz
  -1 siblings, 0 replies; 8+ messages in thread
From: Edmundo Carmona Antoranz @ 2021-04-10 19:58 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: catalin.marinas, will, avagin, 0x7f454c46, mark.rutland, tglx,
	linux-arm-kernel, kernel-janitors

On Sat, Apr 10, 2021 at 1:03 PM Marc Zyngier <maz@kernel.org> wrote:
>
> Hi Edmundo,

Sup!

>
>
> No difference? Have you simply tried removing the macro and witness
> the effect? If it made no difference, why have the macro at all then?

Oh, come on! so having the macro defined so that you can do things like

lib/vdso/gettimeofday.c:34:#ifndef vdso_clocksource_ok

counts as "a difference" to you? XD ok ok ... so, I have deleted
"extended linux kernel C preprocessor knowledge" from my linkedin
profile.

I can safely assume that this is a big resounding NACK, right? :-D

>
> Also, run this, for example:
>
> git grep '^\#define' arch/arm64/include/asm/| awk '$2 == $3 { print }'
>
> Are you going to "fix" these too?
>
> Thanks,

Thank you for the lesson, man. Still have a lot of stuff to learn in
front of me.

Pura vida!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH -next] arm64: vdso: correct definition of macro vdso_clocksource_ok
@ 2021-04-10 19:58     ` Edmundo Carmona Antoranz
  0 siblings, 0 replies; 8+ messages in thread
From: Edmundo Carmona Antoranz @ 2021-04-10 19:58 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: catalin.marinas, will, avagin, 0x7f454c46, mark.rutland, tglx,
	linux-arm-kernel, kernel-janitors

On Sat, Apr 10, 2021 at 1:03 PM Marc Zyngier <maz@kernel.org> wrote:
>
> Hi Edmundo,

Sup!

>
>
> No difference? Have you simply tried removing the macro and witness
> the effect? If it made no difference, why have the macro at all then?

Oh, come on! so having the macro defined so that you can do things like

lib/vdso/gettimeofday.c:34:#ifndef vdso_clocksource_ok

counts as "a difference" to you? XD ok ok ... so, I have deleted
"extended linux kernel C preprocessor knowledge" from my linkedin
profile.

I can safely assume that this is a big resounding NACK, right? :-D

>
> Also, run this, for example:
>
> git grep '^\#define' arch/arm64/include/asm/| awk '$2 == $3 { print }'
>
> Are you going to "fix" these too?
>
> Thanks,

Thank you for the lesson, man. Still have a lot of stuff to learn in
front of me.

Pura vida!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH -next] arm64: vdso: correct definition of macro vdso_clocksource_ok
  2021-04-10 19:58     ` Edmundo Carmona Antoranz
@ 2021-04-10 22:18       ` Marc Zyngier
  -1 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2021-04-10 22:18 UTC (permalink / raw)
  To: Edmundo Carmona Antoranz
  Cc: catalin.marinas, will, avagin, 0x7f454c46, mark.rutland, tglx,
	linux-arm-kernel, kernel-janitors

On Sat, 10 Apr 2021 20:58:22 +0100,
Edmundo Carmona Antoranz <eantoranz@gmail.com> wrote:
> 
> On Sat, Apr 10, 2021 at 1:03 PM Marc Zyngier <maz@kernel.org> wrote:
> >
> > Hi Edmundo,
> 
> Sup!
> 
> >
> >
> > No difference? Have you simply tried removing the macro and witness
> > the effect? If it made no difference, why have the macro at all then?
> 
> Oh, come on! so having the macro defined so that you can do things like
> 
> lib/vdso/gettimeofday.c:34:#ifndef vdso_clocksource_ok
> 
> counts as "a difference" to you? XD ok ok ... so, I have deleted
> "extended linux kernel C preprocessor knowledge" from my linkedin
> profile.

If you want to look cool on Linkedin, the C preprocessor really is the
wrong thing to boast about. Consider adding things like iron oxide,
which will definitely boost your visibility.

> I can safely assume that this is a big resounding NACK, right? :-D

Not necessarily a NAK, because I don't like doing that. But I find
this an unnecessarily change and a fairly pointless divergence from an
established practice. Others may agree with you.

But it was worth pointing out that "it actually makes no difference to
have the macro defined or not" wasn't quite the right thing to put in
the commit message.

>
> >
> > Also, run this, for example:
> >
> > git grep '^\#define' arch/arm64/include/asm/| awk '$2 == $3 { print }'
> >
> > Are you going to "fix" these too?
> >
> > Thanks,
> 
> Thank you for the lesson, man. Still have a lot of stuff to learn in
> front of me.

We all do.

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH -next] arm64: vdso: correct definition of macro vdso_clocksource_ok
@ 2021-04-10 22:18       ` Marc Zyngier
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2021-04-10 22:18 UTC (permalink / raw)
  To: Edmundo Carmona Antoranz
  Cc: catalin.marinas, will, avagin, 0x7f454c46, mark.rutland, tglx,
	linux-arm-kernel, kernel-janitors

On Sat, 10 Apr 2021 20:58:22 +0100,
Edmundo Carmona Antoranz <eantoranz@gmail.com> wrote:
> 
> On Sat, Apr 10, 2021 at 1:03 PM Marc Zyngier <maz@kernel.org> wrote:
> >
> > Hi Edmundo,
> 
> Sup!
> 
> >
> >
> > No difference? Have you simply tried removing the macro and witness
> > the effect? If it made no difference, why have the macro at all then?
> 
> Oh, come on! so having the macro defined so that you can do things like
> 
> lib/vdso/gettimeofday.c:34:#ifndef vdso_clocksource_ok
> 
> counts as "a difference" to you? XD ok ok ... so, I have deleted
> "extended linux kernel C preprocessor knowledge" from my linkedin
> profile.

If you want to look cool on Linkedin, the C preprocessor really is the
wrong thing to boast about. Consider adding things like iron oxide,
which will definitely boost your visibility.

> I can safely assume that this is a big resounding NACK, right? :-D

Not necessarily a NAK, because I don't like doing that. But I find
this an unnecessarily change and a fairly pointless divergence from an
established practice. Others may agree with you.

But it was worth pointing out that "it actually makes no difference to
have the macro defined or not" wasn't quite the right thing to put in
the commit message.

>
> >
> > Also, run this, for example:
> >
> > git grep '^\#define' arch/arm64/include/asm/| awk '$2 == $3 { print }'
> >
> > Are you going to "fix" these too?
> >
> > Thanks,
> 
> Thank you for the lesson, man. Still have a lot of stuff to learn in
> front of me.

We all do.

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-10 22:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-10 18:11 [PATCH -next] arm64: vdso: correct definition of macro vdso_clocksource_ok Edmundo Carmona Antoranz
2021-04-10 18:11 ` Edmundo Carmona Antoranz
2021-04-10 19:03 ` Marc Zyngier
2021-04-10 19:03   ` Marc Zyngier
2021-04-10 19:58   ` Edmundo Carmona Antoranz
2021-04-10 19:58     ` Edmundo Carmona Antoranz
2021-04-10 22:18     ` Marc Zyngier
2021-04-10 22:18       ` Marc Zyngier

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.