mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] [PATCH] change __volatile to __volatile__ for consistency
@ 2024-04-18  3:10 Nihal Jere
  2024-04-19 13:45 ` Rich Felker
  0 siblings, 1 reply; 2+ messages in thread
From: Nihal Jere @ 2024-04-18  3:10 UTC (permalink / raw)
  To: musl; +Cc: Nihal Jere

---
These look like the only two occurences of "__volatile" in musl,
elsewhere "__volatile__" is used.

 arch/x32/atomic_arch.h    | 2 +-
 arch/x86_64/atomic_arch.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x32/atomic_arch.h b/arch/x32/atomic_arch.h
index 918c2d4e..eef253db 100644
--- a/arch/x32/atomic_arch.h
+++ b/arch/x32/atomic_arch.h
@@ -44,7 +44,7 @@ static inline void a_or(volatile int *p, int v)
 #define a_and_64 a_and_64
 static inline void a_and_64(volatile uint64_t *p, uint64_t v)
 {
-	__asm__ __volatile(
+	__asm__ __volatile__(
 		"lock ; and %1, %0"
 		 : "=m"(*p) : "r"(v) : "memory" );
 }
diff --git a/arch/x86_64/atomic_arch.h b/arch/x86_64/atomic_arch.h
index da4e2037..8753b700 100644
--- a/arch/x86_64/atomic_arch.h
+++ b/arch/x86_64/atomic_arch.h
@@ -53,7 +53,7 @@ static inline void a_or(volatile int *p, int v)
 #define a_and_64 a_and_64
 static inline void a_and_64(volatile uint64_t *p, uint64_t v)
 {
-	__asm__ __volatile(
+	__asm__ __volatile__(
 		"lock ; and %1, %0"
 		 : "=m"(*p) : "r"(v) : "memory" );
 }
-- 
2.43.0


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

* Re: [musl] [PATCH] change __volatile to __volatile__ for consistency
  2024-04-18  3:10 [musl] [PATCH] change __volatile to __volatile__ for consistency Nihal Jere
@ 2024-04-19 13:45 ` Rich Felker
  0 siblings, 0 replies; 2+ messages in thread
From: Rich Felker @ 2024-04-19 13:45 UTC (permalink / raw)
  To: Nihal Jere; +Cc: musl

On Wed, Apr 17, 2024 at 10:10:17PM -0500, Nihal Jere wrote:
> ---
> These look like the only two occurences of "__volatile" in musl,
> elsewhere "__volatile__" is used.
> 
>  arch/x32/atomic_arch.h    | 2 +-
>  arch/x86_64/atomic_arch.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x32/atomic_arch.h b/arch/x32/atomic_arch.h
> index 918c2d4e..eef253db 100644
> --- a/arch/x32/atomic_arch.h
> +++ b/arch/x32/atomic_arch.h
> @@ -44,7 +44,7 @@ static inline void a_or(volatile int *p, int v)
>  #define a_and_64 a_and_64
>  static inline void a_and_64(volatile uint64_t *p, uint64_t v)
>  {
> -	__asm__ __volatile(
> +	__asm__ __volatile__(
>  		"lock ; and %1, %0"
>  		 : "=m"(*p) : "r"(v) : "memory" );
>  }
> diff --git a/arch/x86_64/atomic_arch.h b/arch/x86_64/atomic_arch.h
> index da4e2037..8753b700 100644
> --- a/arch/x86_64/atomic_arch.h
> +++ b/arch/x86_64/atomic_arch.h
> @@ -53,7 +53,7 @@ static inline void a_or(volatile int *p, int v)
>  #define a_and_64 a_and_64
>  static inline void a_and_64(volatile uint64_t *p, uint64_t v)
>  {
> -	__asm__ __volatile(
> +	__asm__ __volatile__(
>  		"lock ; and %1, %0"
>  		 : "=m"(*p) : "r"(v) : "memory" );
>  }
> -- 
> 2.43.0

This is probably okay since it's just these two places and these files
are very low-churn to begin with, but in general, "improve
consistency/style" patches are not what we're looking for in musl.

A big value of the project is low "churn" -- that is, files don't get
modified unless there's a strong need to modify them to achieve some
important goal, like fixing a bug, adding new mandatory or highly
wanted functionality, significantly improving performance, etc. This
both makes it possible for humans reading the project commit log to
catch bugs or suspicious changes (because there's a very high signal
to noise ratio), and gives folks using older versions the best chance
of being able to apply bugfix patches with no added work fixing
conflicts.

Rich

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

end of thread, other threads:[~2024-04-19 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18  3:10 [musl] [PATCH] change __volatile to __volatile__ for consistency Nihal Jere
2024-04-19 13:45 ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).