All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Steve French <sfrench@samba.org>,
	CIFS <linux-cifs@vger.kernel.org>,
	samba-technical <samba-technical@lists.samba.org>,
	kernel-janitors <kernel-janitors@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cifs: remove redundant initialization to variable mnt_sign_enabled
Date: Sat, 2 Jul 2022 23:28:17 -0500	[thread overview]
Message-ID: <CAH2r5mucQ9LRBO9Kw6dEeSG=fWsbUnOv=C9b5Bp+fZg_Ox-7-w@mail.gmail.com> (raw)
In-Reply-To: <20220628213229.354032-1-colin.i.king@gmail.com>

merged into cifs-2.6.git for-next

On Tue, Jun 28, 2022 at 4:40 PM Colin Ian King <colin.i.king@gmail.com> wrote:
>
> Variable mnt_sign_enabled is being initialized with a value that
> is never read, it is being reassigned later on with a different
> value. The initialization is redundant and can be removed.
>
> Cleans up clang scan-build warning:
> fs/cifs/cifssmb.c:465:7: warning: Value stored to 'mnt_sign_enabled
>  during its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  fs/cifs/cifssmb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> index 6371b9eebdad..9ed21752f2df 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -462,7 +462,7 @@ cifs_enable_signing(struct TCP_Server_Info *server, bool mnt_sign_required)
>  {
>         bool srv_sign_required = server->sec_mode & server->vals->signing_required;
>         bool srv_sign_enabled = server->sec_mode & server->vals->signing_enabled;
> -       bool mnt_sign_enabled = global_secflags & CIFSSEC_MAY_SIGN;
> +       bool mnt_sign_enabled;
>
>         /*
>          * Is signing required by mnt options? If not then check
> --
> 2.35.3
>


-- 
Thanks,

Steve

      reply	other threads:[~2022-07-03  4:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28 21:32 [PATCH] cifs: remove redundant initialization to variable mnt_sign_enabled Colin Ian King
2022-07-03  4:28 ` 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='CAH2r5mucQ9LRBO9Kw6dEeSG=fWsbUnOv=C9b5Bp+fZg_Ox-7-w@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=colin.i.king@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.