From: "J. Bruce Fields" <bfields@fieldses.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Neil Brown <neilb@suse.de>,
linux-nfs@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] nfsd4: typo logical vs bitwise negate
Date: Mon, 17 Oct 2011 08:35:46 -0400 [thread overview]
Message-ID: <20111017123546.GA9809@fieldses.org> (raw)
In-Reply-To: <20111017074117.GA11912@elgon.mountain>
On Mon, Oct 17, 2011 at 10:41:17AM +0300, Dan Carpenter wrote:
> This should be a bitwise negate here. It silences a Sparse warning:
> fs/nfsd/nfs4xdr.c:693:16: warning: dubious: x & !y
Whoops, thanks for catching that!
Applying for 3.2.--b.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index 2cab33c..645a0a9 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -690,7 +690,7 @@ static __be32 nfsd4_decode_share_deny(struct nfsd4_compoundargs *argp, u32 *x)
> READ_BUF(4);
> READ32(*x);
> /* Note: unlinke access bits, deny bits may be zero. */
> - if (*x & !NFS4_SHARE_DENY_BOTH)
> + if (*x & ~NFS4_SHARE_DENY_BOTH)
> return nfserr_bad_xdr;
> return nfs_ok;
> xdr_error:
prev parent reply other threads:[~2011-10-17 12:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 7:41 [patch] nfsd4: typo logical vs bitwise negate Dan Carpenter
2011-10-17 12:35 ` J. Bruce Fields [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=20111017123546.GA9809@fieldses.org \
--to=bfields@fieldses.org \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/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).