From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id D37C122065 for ; Fri, 19 Apr 2024 15:45:28 +0200 (CEST) Received: (qmail 22322 invoked by uid 550); 19 Apr 2024 13:45:24 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 22280 invoked from network); 19 Apr 2024 13:45:23 -0000 Date: Fri, 19 Apr 2024 09:45:35 -0400 From: Rich Felker To: Nihal Jere Cc: musl@lists.openwall.com Message-ID: <20240419134535.GJ4163@brightrain.aerifal.cx> References: <20240418031046.4383-2-nihal@nihaljere.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240418031046.4383-2-nihal@nihaljere.xyz> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH] change __volatile to __volatile__ for consistency 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