mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zyan@redhat.com>
To: Hariprasad Kelam <hariprasad.kelam@gmail.com>,
	Sage Weil <sage@redhat.com>, Ilya Dryomov <idryomov@gmail.com>,
	ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ceph: fix warning PTR_ERR_OR_ZERO can be used
Date: Sat, 25 May 2019 20:07:34 +0800	[thread overview]
Message-ID: <d17e2d82-81d2-2308-fef8-77b6a5204ad5@redhat.com> (raw)
In-Reply-To: <20190525091559.GA14633@hari-Inspiron-1545>

On 5/25/19 5:15 PM, Hariprasad Kelam wrote:
> change1: fix below warning  reported by coccicheck
> 
> /fs/ceph/export.c:371:33-39: WARNING: PTR_ERR_OR_ZERO can be used
> 
> change2: typecasted PTR_ERR_OR_ZERO to long as dout expecting long
> 
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> ---
>   fs/ceph/export.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ceph/export.c b/fs/ceph/export.c
> index d3ef7ee42..15ff1b0 100644
> --- a/fs/ceph/export.c
> +++ b/fs/ceph/export.c
> @@ -368,7 +368,7 @@ static struct dentry *ceph_get_parent(struct dentry *child)
>   	}
>   out:
>   	dout("get_parent %p ino %llx.%llx err=%ld\n",
> -	     child, ceph_vinop(inode), (IS_ERR(dn) ? PTR_ERR(dn) : 0));
> +	     child, ceph_vinop(inode), (long)PTR_ERR_OR_ZERO(dn));
>   	return dn;
>   }
>   
> 

Applied.

Thanks
Yan, Zheng

      reply	other threads:[~2019-05-25 12:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-25  9:15 Hariprasad Kelam
2019-05-25 12:07 ` Yan, Zheng [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=d17e2d82-81d2-2308-fef8-77b6a5204ad5@redhat.com \
    --to=zyan@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=hariprasad.kelam@gmail.com \
    --cc=idryomov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sage@redhat.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

all inboxes | Powered by JetHome®