diff mbox series

[-next] IB/srpt: Drop pointless static qualifier in srpt_make_tpg()

Message ID 1542279300-104731-1-git-send-email-yuehaibing@huawei.com (mailing list archive)
State Accepted
Commit 89180e814aa3cfbdfceaaeed08b6ebab73b1e359
Delegated to: Jason Gunthorpe
Headers show
Series [-next] IB/srpt: Drop pointless static qualifier in srpt_make_tpg() | expand

Commit Message

Yue Haibing Nov. 15, 2018, 10:55 a.m. UTC
From: Yue Haibing <yuehaibing@huawei.com>

There is no need to have the 'struct se_portal_group *tpg' variable
static since new value always be assigned before use it.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
---
 drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky Nov. 16, 2018, 1:59 a.m. UTC | #1
On Thu, Nov 15, 2018 at 10:55:00AM +0000, YueHaibing wrote:
> From: Yue Haibing <yuehaibing@huawei.com>
>
> There is no need to have the 'struct se_portal_group *tpg' variable
> static since new value always be assigned before use it.
>
> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
> ---
>  drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Bart Van Assche Nov. 20, 2018, 3:43 a.m. UTC | #2
On 11/15/18 2:55 AM, YueHaibing wrote:
> From: Yue Haibing <yuehaibing@huawei.com>
> 
> There is no need to have the 'struct se_portal_group *tpg' variable
> static since new value always be assigned before use it.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Jason Gunthorpe Nov. 21, 2018, 11:51 p.m. UTC | #3
On Thu, Nov 15, 2018 at 10:55:00AM +0000, YueHaibing wrote:
> From: Yue Haibing <yuehaibing@huawei.com>
> 
> There is no need to have the 'struct se_portal_group *tpg' variable
> static since new value always be assigned before use it.
> 
> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next

Thanks,
Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 1ae638b..fe02fab 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -3602,7 +3602,7 @@  static struct se_portal_group *srpt_make_tpg(struct se_wwn *wwn,
 					     const char *name)
 {
 	struct srpt_port *sport = wwn->priv;
-	static struct se_portal_group *tpg;
+	struct se_portal_group *tpg;
 	int res;
 
 	WARN_ON_ONCE(wwn != &sport->port_guid_wwn &&