linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Steve French <sfrench@samba.org>,
	Pavel Shilovskiy <pshilov@microsoft.com>,
	Ronnie Sahlberg <lsahlber@redhat.com>,
	CIFS <linux-cifs@vger.kernel.org>,
	samba-technical <samba-technical@lists.samba.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] cifs: remove set but not used variable 'server'
Date: Fri, 17 Jan 2020 01:53:26 -0600	[thread overview]
Message-ID: <CAH2r5ms=s_c5YOPfXdTE-ee6LX_Quq9_Oao4p_k0b59fDNemWQ@mail.gmail.com> (raw)
In-Reply-To: <20200117025717.58636-1-yuehaibing@huawei.com>

merged into cifs-2.6.git for-next

On Thu, Jan 16, 2020 at 10:01 PM YueHaibing <yuehaibing@huawei.com> wrote:
>
> fs/cifs/smb2pdu.c: In function 'SMB2_query_directory':
> fs/cifs/smb2pdu.c:4444:26: warning:
>  variable 'server' set but not used [-Wunused-but-set-variable]
>   struct TCP_Server_Info *server;
>
> It is not used, so remove it.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  fs/cifs/smb2pdu.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
> index a23ca3d..64d5a36 100644
> --- a/fs/cifs/smb2pdu.c
> +++ b/fs/cifs/smb2pdu.c
> @@ -4441,13 +4441,10 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
>         int resp_buftype = CIFS_NO_BUFFER;
>         struct kvec rsp_iov;
>         int rc = 0;
> -       struct TCP_Server_Info *server;
>         struct cifs_ses *ses = tcon->ses;
>         int flags = 0;
>
> -       if (ses && (ses->server))
> -               server = ses->server;
> -       else
> +       if (!ses || !(ses->server))
>                 return -EIO;
>
>         if (smb3_encryption_required(tcon))
> --
> 2.7.4
>
>


-- 
Thanks,

Steve

      reply	other threads:[~2020-01-17  7:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-17  2:57 [PATCH -next] cifs: remove set but not used variable 'server' YueHaibing
2020-01-17  7:53 ` Steve French [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='CAH2r5ms=s_c5YOPfXdTE-ee6LX_Quq9_Oao4p_k0b59fDNemWQ@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    --cc=pshilov@microsoft.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    --cc=yuehaibing@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;
as well as URLs for NNTP newsgroup(s).