From: 王明-软件底层技术部 <machel@vivo.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Jon Mason <jdmason@kudzu.us>, Dave Jiang <dave.jiang@intel.com>,
Allen Hubbe <allenbh@gmail.com>,
Serge Semin <fancer.lancer@gmail.com>,
Dan Carpenter <error27@gmail.com>,
Jiasheng Jiang <jiasheng@iscas.ac.cn>,
"ntb@lists.linux.dev" <ntb@lists.linux.dev>,
LKML <linux-kernel@vger.kernel.org>,
opensource.kernel <opensource.kernel@vivo.com>
Subject: 回复: 回复: [PATCH v2] ntb:Fix an NULL vs IS_ERR() bug for debugfs_create_dir() in tool_setup_dbgfs()
Date: Thu, 13 Jul 2023 07:23:29 +0000 [thread overview]
Message-ID: <SG2PR06MB3743FE0EB3FE1D3FE2D2FD44BD37A@SG2PR06MB3743.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <bc1efd80-a490-4037-9e83-e0bb5cc0cb47@kadam.mountain>
Hi Dan Carpenter
Thank you for your guidance to me every time. I will submit it again. Thank you very much
regards,
Ming
-----邮件原件-----
发件人: Dan Carpenter <dan.carpenter@linaro.org>
发送时间: 2023年7月13日 14:00
收件人: 王明-软件底层技术部 <machel@vivo.com>
抄送: Jon Mason <jdmason@kudzu.us>; Dave Jiang <dave.jiang@intel.com>; Allen Hubbe <allenbh@gmail.com>; Serge Semin <fancer.lancer@gmail.com>; Dan Carpenter <error27@gmail.com>; Jiasheng Jiang <jiasheng@iscas.ac.cn>; ntb@lists.linux.dev; LKML <linux-kernel@vger.kernel.org>; opensource.kernel <opensource.kernel@vivo.com>
主题: Re: 回复: [PATCH v2] ntb:Fix an NULL vs IS_ERR() bug for debugfs_create_dir() in tool_setup_dbgfs()
On Thu, Jul 13, 2023 at 02:13:32AM +0000, 王明-软件底层技术部 wrote:
> Hi dan carpenter
> You mean that this modification is correct, but there is no need to do
> so, is that the understanding?
No, this patch is wrong. Possibly harmless, possibly harmful but either way it is wrong. The correct way is:
diff --git a/drivers/ntb/test/ntb_tool.c b/drivers/ntb/test/ntb_tool.c index eeeb4b1c97d2..e0acc11d29ba 100644
--- a/drivers/ntb/test/ntb_tool.c
+++ b/drivers/ntb/test/ntb_tool.c
@@ -1495,8 +1495,6 @@ static void tool_setup_dbgfs(struct tool_ctx *tc)
tc->dbgfs_dir = debugfs_create_dir(dev_name(&tc->ntb->dev),
tool_dbgfs_topdir);
- if (!tc->dbgfs_dir)
- return;
debugfs_create_file("port", 0600, tc->dbgfs_dir,
tc, &tool_port_fops);
prev parent reply other threads:[~2023-07-13 7:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 12:39 [PATCH v2] ntb:Fix an NULL vs IS_ERR() bug for debugfs_create_dir() in tool_setup_dbgfs() Wang Ming
2023-07-12 13:50 ` Dan Carpenter
2023-07-13 2:13 ` 回复: " 王明-软件底层技术部
2023-07-13 6:00 ` Dan Carpenter
2023-07-13 7:23 ` 王明-软件底层技术部 [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=SG2PR06MB3743FE0EB3FE1D3FE2D2FD44BD37A@SG2PR06MB3743.apcprd06.prod.outlook.com \
--to=machel@vivo.com \
--cc=allenbh@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=dave.jiang@intel.com \
--cc=error27@gmail.com \
--cc=fancer.lancer@gmail.com \
--cc=jdmason@kudzu.us \
--cc=jiasheng@iscas.ac.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=ntb@lists.linux.dev \
--cc=opensource.kernel@vivo.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).