netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] tcm_vhost: remove unused variable in vhost_scsi_allocate_cmd()
@ 2012-11-07 12:53 Wei Yongjun
  2012-11-09  5:24 ` Nicholas A. Bellinger
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2012-11-07 12:53 UTC (permalink / raw)
  To: mst; +Cc: netdev, yongjun_wei, kvm, virtualization

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

The variable se_sess is initialized but never used
otherwise, so remove the unused variable.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/vhost/tcm_vhost.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
index 23c138f..551fff0 100644
--- a/drivers/vhost/tcm_vhost.c
+++ b/drivers/vhost/tcm_vhost.c
@@ -415,14 +415,12 @@ static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
 {
 	struct tcm_vhost_cmd *tv_cmd;
 	struct tcm_vhost_nexus *tv_nexus;
-	struct se_session *se_sess;
 
 	tv_nexus = tv_tpg->tpg_nexus;
 	if (!tv_nexus) {
 		pr_err("Unable to locate active struct tcm_vhost_nexus\n");
 		return ERR_PTR(-EIO);
 	}
-	se_sess = tv_nexus->tvn_se_sess;
 
 	tv_cmd = kzalloc(sizeof(struct tcm_vhost_cmd), GFP_ATOMIC);
 	if (!tv_cmd) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] tcm_vhost: remove unused variable in vhost_scsi_allocate_cmd()
  2012-11-07 12:53 [PATCH -next] tcm_vhost: remove unused variable in vhost_scsi_allocate_cmd() Wei Yongjun
@ 2012-11-09  5:24 ` Nicholas A. Bellinger
  0 siblings, 0 replies; 2+ messages in thread
From: Nicholas A. Bellinger @ 2012-11-09  5:24 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: kvm, mst, netdev, virtualization, yongjun_wei, target-devel

Hello Wei,

On Wed, 2012-11-07 at 20:53 +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> The variable se_sess is initialized but never used
> otherwise, so remove the unused variable.
> 
> dpatch engine is used to auto generate this patch.
> (https://github.com/weiyj/dpatch)
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  drivers/vhost/tcm_vhost.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
> index 23c138f..551fff0 100644
> --- a/drivers/vhost/tcm_vhost.c
> +++ b/drivers/vhost/tcm_vhost.c
> @@ -415,14 +415,12 @@ static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
>  {
>  	struct tcm_vhost_cmd *tv_cmd;
>  	struct tcm_vhost_nexus *tv_nexus;
> -	struct se_session *se_sess;
>  
>  	tv_nexus = tv_tpg->tpg_nexus;
>  	if (!tv_nexus) {
>  		pr_err("Unable to locate active struct tcm_vhost_nexus\n");
>  		return ERR_PTR(-EIO);
>  	}
> -	se_sess = tv_nexus->tvn_se_sess;
>  
>  	tv_cmd = kzalloc(sizeof(struct tcm_vhost_cmd), GFP_ATOMIC);
>  	if (!tv_cmd) {
> 
> --

Looks fine to me.

Reviewed-by + Acked-by: Nicholas Bellinger <nab@linux-iscsi.org>

Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-09  5:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07 12:53 [PATCH -next] tcm_vhost: remove unused variable in vhost_scsi_allocate_cmd() Wei Yongjun
2012-11-09  5:24 ` Nicholas A. Bellinger

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).