lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 20 Dec 2018 13:24:30 +0100
From:   Cornelia Huck <cohuck@...hat.com>
To:     Michael Mueller <mimu@...ux.ibm.com>
Cc:     KVM Mailing List <kvm@...r.kernel.org>,
        Linux-S390 Mailing List <linux-s390@...r.kernel.org>,
        linux-kernel@...r.kernel.org,
        Martin Schwidefsky <schwidefsky@...ibm.com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Christian Borntraeger <borntraeger@...ibm.com>,
        Janosch Frank <frankja@...ux.ibm.com>,
        David Hildenbrand <david@...hat.com>,
        Halil Pasic <pasic@...ux.ibm.com>,
        Pierre Morel <pmorel@...ux.ibm.com>
Subject: Re: [PATCH v5 06/15] KVM: s390: remove prefix kvm_s390_gisa_ from
 static inline functions

On Wed, 19 Dec 2018 20:17:47 +0100
Michael Mueller <mimu@...ux.ibm.com> wrote:

> This will shorten the length of code lines.
> All GISA related static inline functions are local to interrupt.c
> 
> Signed-off-by: Michael Mueller <mimu@...ux.ibm.com>
> ---
>  arch/s390/kvm/interrupt.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
> index 4ab20d2eb180..9b1fa39b6f90 100644
> --- a/arch/s390/kvm/interrupt.c
> +++ b/arch/s390/kvm/interrupt.c
> @@ -224,22 +224,22 @@ static inline u8 int_word_to_isc(u32 int_word)
>   */
>  #define IPM_BIT_OFFSET (offsetof(struct kvm_s390_gisa, ipm) * BITS_PER_BYTE)
>  
> -static inline void kvm_s390_gisa_set_ipm_gisc(struct kvm_s390_gisa *gisa, u32 gisc)
> +static inline void set_ipm_gisc(struct kvm_s390_gisa *gisa, u32 gisc)
>  {
>  	set_bit_inv(IPM_BIT_OFFSET + gisc, (unsigned long *) gisa);
>  }
>  
> -static inline u8 kvm_s390_gisa_get_ipm(struct kvm_s390_gisa *gisa)
> +static inline u8 get_ipm(struct kvm_s390_gisa *gisa)
>  {
>  	return READ_ONCE(gisa->ipm);
>  }
>  
> -static inline void kvm_s390_gisa_clear_ipm_gisc(struct kvm_s390_gisa *gisa, u32 gisc)
> +static inline void clear_ipm_gisc(struct kvm_s390_gisa *gisa, u32 gisc)
>  {
>  	clear_bit_inv(IPM_BIT_OFFSET + gisc, (unsigned long *) gisa);
>  }
>  
> -static inline int kvm_s390_gisa_tac_ipm_gisc(struct kvm_s390_gisa *gisa, u32 gisc)
> +static inline int tac_ipm_gisc(struct kvm_s390_gisa *gisa, u32 gisc)
>  {
>  	return test_and_clear_bit_inv(IPM_BIT_OFFSET + gisc, (unsigned long *) gisa);
>  }

I don't disagree with making them shorter, but I think the code would
be more readable if you only dropped the kvm_s390_ prefix and kept
annotating the functions as gisa_.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ