public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: Thomas Huth <thuth@redhat.com>, Cornelia Huck <cohuck@redhat.com>,
	David Hildenbrand <david@redhat.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
	Paolo Bonzini <pbonzini@redhat.com>,
	Andrew Jones <drjones@redhat.com>
Subject: Re: [kvm-unit-tests PATCH] s390x: unify header guards
Date: Wed, 2 Jun 2021 08:49:52 +0200	[thread overview]
Message-ID: <28419313-ab8e-322e-4995-30f42e4f5236@linux.ibm.com> (raw)
In-Reply-To: <d87b32d6-1d41-1413-96c6-0d6b2361b079@redhat.com>

On 6/2/21 5:56 AM, Thomas Huth wrote:
> On 01/06/2021 18.15, Cornelia Huck wrote:
>> Let's unify the header guards to _ASM_S390X_FILE_H_ respectively
>> _S390X_FILE_H_. This makes it more obvious what the file is
>> about, and avoids possible name space collisions.
>>
>> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
>> ---
>>
>> Only did s390x for now; the other archs seem to be inconsistent in
>> places as well, and I can also try to tackle them if it makes sense.
> ...
>> diff --git a/lib/s390x/asm/bitops.h b/lib/s390x/asm/bitops.h
>> index 792881ec3249..61cd38fd36b7 100644
>> --- a/lib/s390x/asm/bitops.h
>> +++ b/lib/s390x/asm/bitops.h
>> @@ -8,8 +8,8 @@
>>    *    Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>,
>>    *
>>    */
>> -#ifndef _ASMS390X_BITOPS_H_
>> -#define _ASMS390X_BITOPS_H_
>> +#ifndef _ASM_S390X_BITOPS_H_
>> +#define _ASM_S390X_BITOPS_H_
> 
> Why not the other way round (S390X_ASM_BITOPS_H) ?
> 
>  > diff --git a/s390x/sthyi.h b/s390x/sthyi.h
>  > index bbd74c6197c3..eb92fdd2f2b2 100644
>  > --- a/s390x/sthyi.h
>  > +++ b/s390x/sthyi.h
>  > @@ -7,8 +7,8 @@
>  >   * Authors:
>  >   *    Janosch Frank <frankja@linux.vnet.ibm.com>
>  >   */
>  > -#ifndef _STHYI_H_
>  > -#define _STHYI_H_
>  > +#ifndef _S390X_STHYI_H_
>  > +#define _S390X_STHYI_H_
> 
> While we're at it: Do we also want to drop the leading (and trailing) 
> underscores here? ... since leading underscore followed by a capital letter 
> is a reserved namespace in C and you should normally not use these in nice 
> programs...? I think I'm ok with keeping the underscores in the files in the 
> lib folder (since these are our core libraries, similar to the system and 
> libc headers on a normal system), but in files that are not part of the lib 
> folder, we should rather avoid them.

Yes please.
Also, I have the feeling that we should document our decision so we can
point people to a file if questions arise.


> 
>   Thomas
> 


  reply	other threads:[~2021-06-02  6:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 16:15 [kvm-unit-tests PATCH] s390x: unify header guards Cornelia Huck
2021-06-01 16:25 ` Claudio Imbrenda
2021-06-01 16:55   ` Cornelia Huck
2021-06-02  3:56 ` Thomas Huth
2021-06-02  6:49   ` Janosch Frank [this message]
2021-06-02  6:59   ` Cornelia Huck

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=28419313-ab8e-322e-4995-30f42e4f5236@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=drjones@redhat.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=thuth@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox