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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 7 Jan 2021 18:27:33 +0100
From:   Julian Wiedmann <jwi@...ux.ibm.com>
To:     Zheng Yongjun <zhengyongjun3@...wei.com>,
        linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] s390: cio: Use DEFINE_SPINLOCK() for spinlock

On 23.12.20 15:15, Zheng Yongjun wrote:
> spinlock can be initialized automatically with DEFINE_SPINLOCK()
> rather than explicitly calling spin_lock_init().
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.com>
> ---
>  drivers/s390/cio/css.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
> index cca1a7c4bb33..022f573f0bcc 100644
> --- a/drivers/s390/cio/css.c
> +++ b/drivers/s390/cio/css.c
> @@ -647,13 +647,12 @@ static void css_sch_todo(struct work_struct *work)
>  }
>  
>  static struct idset *slow_subchannel_set;
> -static spinlock_t slow_subchannel_lock;
> +static DEFINE_SPINLOCK(slow_subchannel_lock);
>  static wait_queue_head_t css_eval_wq;
>  static atomic_t css_eval_scheduled;
>  
>  static int __init slow_subchannel_init(void)
>  {
> -	spin_lock_init(&slow_subchannel_lock);


>  	atomic_set(&css_eval_scheduled, 0);
>  	init_waitqueue_head(&css_eval_wq);

Mind turning these two into static initializations as well? Thanks.


>  	slow_subchannel_set = idset_sch_new();
> 

Powered by blists - more mailing lists