mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julian Wiedmann <jwi@linux.ibm.com>
To: Zheng Yongjun <zhengyongjun3@huawei.com>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] s390: cio: Use DEFINE_SPINLOCK() for spinlock
Date: Thu, 7 Jan 2021 18:27:33 +0100	[thread overview]
Message-ID: <3aed4509-a903-5b26-3667-ad420b1bbb7b@linux.ibm.com> (raw)
In-Reply-To: <20201223141512.1178-1-zhengyongjun3@huawei.com>

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@huawei.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();
> 

      reply	other threads:[~2021-01-07 17:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23 14:15 Zheng Yongjun
2021-01-07 17:27 ` Julian Wiedmann [this message]

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=3aed4509-a903-5b26-3667-ad420b1bbb7b@linux.ibm.com \
    --to=jwi@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=zhengyongjun3@huawei.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

all inboxes | Powered by JetHome®