From: Trond Myklebust <trondmy@primarydata.com>
To: "colin.king@canonical.com" <colin.king@canonical.com>,
"bfields@fieldses.org" <bfields@fieldses.org>, hch <hch@lst.de>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"jlayton@poochiereds.net" <jlayton@poochiereds.net>,
"elfring@users.sourceforge.net" <elfring@users.sourceforge.net>,
"bcodding redhat" <bcodding@redhat.com>,
"anna.schumaker@netapp.com" <anna.schumaker@netapp.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH 2/2] lockd: Adjust 61 checks for null pointers
Date: Fri, 18 Aug 2017 15:53:53 +0000 [thread overview]
Message-ID: <1503071631.44656.4.camel@primarydata.com> (raw)
In-Reply-To: <e76e873f-f18e-5bdd-cc93-255321b3d98f@users.sourceforge.net>
On Thu, 2017-08-17 at 16:34 +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 17 Aug 2017 16:00:18 +0200
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> The script “checkpatch.pl” pointed information out like the
> following.
>
> Comparison to NULL could be written …
>
> Thus fix the affected source code places.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> fs/lockd/clnt4xdr.c | 12 ++++++------
> fs/lockd/clntlock.c | 10 +++++-----
> fs/lockd/clntproc.c | 12 ++++++------
> fs/lockd/clntxdr.c | 12 ++++++------
> fs/lockd/host.c | 22 +++++++++++-----------
> fs/lockd/mon.c | 16 ++++++++--------
> fs/lockd/svc.c | 4 ++--
> fs/lockd/svc4proc.c | 6 +++---
> fs/lockd/svclock.c | 14 +++++++-------
> fs/lockd/svcproc.c | 6 +++---
> fs/lockd/svcshare.c | 2 +-
> fs/lockd/svcsubs.c | 3 +--
> 12 files changed, 59 insertions(+), 60 deletions(-)
>
> diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c
> index c349fc0f9b80..ec6473d194fd 100644
> --- a/fs/lockd/clnt4xdr.c
> +++ b/fs/lockd/clnt4xdr.c
> @@ -131,7 +131,7 @@ static int decode_netobj(struct xdr_stream *xdr,
> __be32 *p;
>
> p = xdr_inline_decode(xdr, 4);
> - if (unlikely(p == NULL))
> + if (unlikely(!p))
Oh STOP with the checkpatch wankfest!
--
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust@primarydata.com
next prev parent reply other threads:[~2017-08-18 15:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-17 14:32 [PATCH 0/2] lockd: Adjustments for some function implementations SF Markus Elfring
2017-08-17 14:33 ` [PATCH 1/2] lockd: Delete an error message for a failed memory allocation in reclaimer() SF Markus Elfring
2017-08-17 14:34 ` [PATCH 2/2] lockd: Adjust 61 checks for null pointers SF Markus Elfring
2017-08-18 15:53 ` Trond Myklebust [this message]
2017-08-18 16:04 ` Jeff Layton
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=1503071631.44656.4.camel@primarydata.com \
--to=trondmy@primarydata.com \
--cc=anna.schumaker@netapp.com \
--cc=bcodding@redhat.com \
--cc=bfields@fieldses.org \
--cc=colin.king@canonical.com \
--cc=elfring@users.sourceforge.net \
--cc=hch@lst.de \
--cc=jlayton@poochiereds.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox