Message ID | 20200916062133.191000-1-miaoqinglang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [-next] scsi: bnx2i: remove unnecessary mutex_init() | expand |
> -----Original Message----- > From: Qinglang Miao <miaoqinglang@huawei.com> > Sent: Wednesday, September 16, 2020 11:52 AM > To: Nilesh Javali <njavali@marvell.com>; Manish Rangankar > <mrangankar@marvell.com>; GR-QLogic-Storage-Upstream <GR-QLogic- > Storage-Upstream@marvell.com>; James E.J. Bottomley > <jejb@linux.ibm.com>; Martin K. Petersen <martin.petersen@oracle.com> > Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; Qinglang Miao > <miaoqinglang@huawei.com> > Subject: [EXT] [PATCH -next] scsi: bnx2i: remove unnecessary mutex_init() > > External Email > > ---------------------------------------------------------------------- > The mutex bnx2i_dev_lock is initialized statically. It is unnecessary to > initialize by mutex_init(). > > Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> > --- > drivers/scsi/bnx2i/bnx2i_init.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/scsi/bnx2i/bnx2i_init.c b/drivers/scsi/bnx2i/bnx2i_init.c > index 6018cdd17..2b3f0c104 100644 > --- a/drivers/scsi/bnx2i/bnx2i_init.c > +++ b/drivers/scsi/bnx2i/bnx2i_init.c > @@ -474,8 +474,6 @@ static int __init bnx2i_mod_init(void) > if (sq_size && !is_power_of_2(sq_size)) > sq_size = roundup_pow_of_two(sq_size); > > - mutex_init(&bnx2i_dev_lock); > - > bnx2i_scsi_xport_template = > iscsi_register_transport(&bnx2i_iscsi_transport); > if (!bnx2i_scsi_xport_template) { > -- Thanks, Acked-by: Manish Rangankar <mrangankar@marvell.com>
Qinglang, > The mutex bnx2i_dev_lock is initialized statically. It is > unnecessary to initialize by mutex_init(). Applied to 5.10/scsi-staging, thanks!
On Wed, 16 Sep 2020 14:21:33 +0800, Qinglang Miao wrote: > The mutex bnx2i_dev_lock is initialized statically. It is > unnecessary to initialize by mutex_init(). Applied to 5.10/scsi-queue, thanks! [1/1] scsi: bnx2i: Remove unnecessary mutex_init() https://git.kernel.org/mkp/scsi/c/97d0e04d38b4
diff --git a/drivers/scsi/bnx2i/bnx2i_init.c b/drivers/scsi/bnx2i/bnx2i_init.c index 6018cdd17..2b3f0c104 100644 --- a/drivers/scsi/bnx2i/bnx2i_init.c +++ b/drivers/scsi/bnx2i/bnx2i_init.c @@ -474,8 +474,6 @@ static int __init bnx2i_mod_init(void) if (sq_size && !is_power_of_2(sq_size)) sq_size = roundup_pow_of_two(sq_size); - mutex_init(&bnx2i_dev_lock); - bnx2i_scsi_xport_template = iscsi_register_transport(&bnx2i_iscsi_transport); if (!bnx2i_scsi_xport_template) {
The mutex bnx2i_dev_lock is initialized statically. It is unnecessary to initialize by mutex_init(). Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> --- drivers/scsi/bnx2i/bnx2i_init.c | 2 -- 1 file changed, 2 deletions(-)