* [PATCH -next] i40iw: Use DEFINE_SPINLOCK() for spinlock
@ 2021-04-09 9:51 Ye Bin
2021-04-12 18:39 ` Jason Gunthorpe
0 siblings, 1 reply; 2+ messages in thread
From: Ye Bin @ 2021-04-09 9:51 UTC (permalink / raw)
To: yebin10, Faisal Latif, Shiraz Saleem, Doug Ledford, Jason Gunthorpe
Cc: linux-rdma, kernel-janitors, Hulk Robot
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
drivers/infiniband/hw/i40iw/i40iw_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c
index 2ebcbb1ddaa2..b496f30ce066 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_main.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_main.c
@@ -78,7 +78,7 @@ static struct i40e_client i40iw_client;
static char i40iw_client_name[I40E_CLIENT_STR_LENGTH] = "i40iw";
static LIST_HEAD(i40iw_handlers);
-static spinlock_t i40iw_handler_lock;
+static DEFINE_SPINLOCK(i40iw_handler_lock);
static enum i40iw_status_code i40iw_virtchnl_send(struct i40iw_sc_dev *dev,
u32 vf_id, u8 *msg, u16 len);
@@ -2043,7 +2043,6 @@ static int __init i40iw_init_module(void)
i40iw_client.ops = &i40e_ops;
memcpy(i40iw_client.name, i40iw_client_name, I40E_CLIENT_STR_LENGTH);
i40iw_client.type = I40E_CLIENT_IWARP;
- spin_lock_init(&i40iw_handler_lock);
ret = i40e_register_client(&i40iw_client);
i40iw_register_notifiers();
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] i40iw: Use DEFINE_SPINLOCK() for spinlock
2021-04-09 9:51 [PATCH -next] i40iw: Use DEFINE_SPINLOCK() for spinlock Ye Bin
@ 2021-04-12 18:39 ` Jason Gunthorpe
0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2021-04-12 18:39 UTC (permalink / raw)
To: Ye Bin
Cc: Faisal Latif, Shiraz Saleem, Doug Ledford, linux-rdma,
kernel-janitors, Hulk Robot
On Fri, Apr 09, 2021 at 05:51:47PM +0800, Ye Bin wrote:
> spinlock can be initialized automatically with DEFINE_SPINLOCK()
> rather than explicitly calling spin_lock_init().
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Ye Bin <yebin10@huawei.com>
> ---
> drivers/infiniband/hw/i40iw/i40iw_main.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-12 18:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 9:51 [PATCH -next] i40iw: Use DEFINE_SPINLOCK() for spinlock Ye Bin
2021-04-12 18:39 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).