From: liqiong <liqiong@nfschina.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, yuzhe@nfschina.com,
renyu@nfschina.com, jiaming@nfschina.com
Subject: Re: [PATCH] tracing: Do PTR_ERR() after IS_ERR()
Date: Thu, 28 Jul 2022 08:28:08 +0800 [thread overview]
Message-ID: <efce3a4c-4480-99f5-0229-a44009ebe9d8@nfschina.com> (raw)
In-Reply-To: <20220727122847.6b00e29d@rorschach.local.home>
在 2022年07月28日 00:28, Steven Rostedt 写道:
> On Wed, 27 Jul 2022 23:35:19 +0800
> Li Qiong <liqiong@nfschina.com> wrote:
>
>> Check IS_ERR() firstly, then do PTR_ERR().
> Why?
>
> The code is fine as is.
>
> -- Steve
>
Hi,
It's all right, assign PTR_ERR() to 'ret' anyway.
But this assignment is valid only at the "IS_ERR()" path.
Maybe it is better put "PTR_ERR()" at error path, keep the code clear.
--
李力琼 <13524287433>
上海市浦东新区海科路99号中科院上海高等研究院3号楼3楼
next prev parent reply other threads:[~2022-07-28 0:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 15:35 Li Qiong
2022-07-27 16:28 ` Steven Rostedt
2022-07-28 0:28 ` liqiong [this message]
2022-07-29 16:56 ` Steven Rostedt
2022-07-30 1:20 ` 李力琼
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=efce3a4c-4480-99f5-0229-a44009ebe9d8@nfschina.com \
--to=liqiong@nfschina.com \
--cc=jiaming@nfschina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=renyu@nfschina.com \
--cc=rostedt@goodmis.org \
--cc=yuzhe@nfschina.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®