mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Moritz Fischer <mdf@kernel.org>
To: Tom Rix <trix@redhat.com>
Cc: Zheng Yongjun <zhengyongjun3@huawei.com>,
	mdf@kernel.org, linux-fpga@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] fpga: Use DEFINE_SPINLOCK() for spinlock
Date: Sun, 10 Jan 2021 11:07:10 -0800	[thread overview]
Message-ID: <X/tQXoXxx9JqUZ+g@archbook> (raw)
In-Reply-To: <58fed6b1-dbab-7696-1086-c8d84cff0379@redhat.com>

On Sat, Jan 09, 2021 at 02:08:53PM -0800, Tom Rix wrote:
> 
> On 12/28/20 5:51 AM, 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>
> 
> This looks fine.
> 
> Reviewed-by: Tom Rix <trix@redhat.com>
> 
> > ---
> >  drivers/fpga/fpga-bridge.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/fpga/fpga-bridge.c b/drivers/fpga/fpga-bridge.c
> > index 2deccacc3aa7..e9266b2a357f 100644
> > --- a/drivers/fpga/fpga-bridge.c
> > +++ b/drivers/fpga/fpga-bridge.c
> > @@ -17,7 +17,7 @@ static DEFINE_IDA(fpga_bridge_ida);
> >  static struct class *fpga_bridge_class;
> >  
> >  /* Lock for adding/removing bridges to linked lists*/
> > -static spinlock_t bridge_list_lock;
> > +static DEFINE_SPINLOCK(bridge_list_lock);
> >  
> >  /**
> >   * fpga_bridge_enable - Enable transactions on the bridge
> > @@ -479,8 +479,6 @@ static void fpga_bridge_dev_release(struct device *dev)
> >  
> >  static int __init fpga_bridge_dev_init(void)
> >  {
> > -	spin_lock_init(&bridge_list_lock);
> > -
> >  	fpga_bridge_class = class_create(THIS_MODULE, "fpga_bridge");
> >  	if (IS_ERR(fpga_bridge_class))
> >  		return PTR_ERR(fpga_bridge_class);
> 

Applied,

Thanks

      reply	other threads:[~2021-01-10 19:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28 13:51 Zheng Yongjun
2021-01-09 22:08 ` Tom Rix
2021-01-10 19:07   ` Moritz Fischer [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=X/tQXoXxx9JqUZ+g@archbook \
    --to=mdf@kernel.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trix@redhat.com \
    --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®