Skip to contentSkip to conversation

ntb: Remove error checking for debugfs_create_dir()

PATCH In review Wang Ming 5 participants 15 messages Jul 13, 2023 – Jul 14, 2023

Subsystems (2)
lore
Share & tools
lore

Wang Ming

author
#0 lore raw

PATCH v3 1/1 ntb: Remove error checking for debugfs_create_dir()

It is expected that most callers should _ignore_ the errors return by debugfs_create_dir() in tool_setup_dbgfs()

---
 drivers/ntb/test/ntb_tool.c | 2 --
 1 file changed, 2 deletions(-)
drivers/ntb/test/ntb_tool.c +0 -2
index eeeb4b1c97d2..e0acc11d29ba 100644
@@ -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);
Signature · 1 line
2.25.1
author Reviewed-by Dan Carpenter
#2 lore raw

Hi dan carpenter
Sorry to bother you again, Is there anything wrong with my patch? Can this patch be applied?

Sincere thanks to you,
Wang Ming

-----邮件原件-----
发件人: Dan Carpenter <[email protected]>
发送时间: 2023年7月13日 17:27
收件人: 王明-软件底层技术部 <[email protected]>
抄送: Jon Mason <[email protected]>; Dave Jiang <[email protected]>; Allen Hubbe <[email protected]>; Serge Semin <[email protected]>; Dan Carpenter <[email protected]>; Jiasheng Jiang <[email protected]>; [email protected]; [email protected]; opensource.kernel <[email protected]> 主题: Re: [PATCH v3] ntb: Remove error checking for debugfs_create_dir()

Quoted 4 lines · Wang Ming

It is expected that most callers should _ignore_ the errors return by debugfs_create_dir() in tool_setup_dbgfs()

regards,
dan carpenter

#3 lore raw
Quoted 3 lines · 王明-软件底层技术部

Hi dan carpenter
Sorry to bother you again, Is there anything wrong with my patch? Can this patch be applied?

I'm not the NTB maintainer. I don't see a reason why it can't be applied but, please, wait for two weeks for maintainer feedback.

regards,
dan carpenter

#4 lore raw

Ok, thank you 😊
regards,
Ming

-----邮件原件-----
发件人: Dan Carpenter <[email protected]>
发送时间: 2023年7月13日 18:14
收件人: 王明-软件底层技术部 <[email protected]>
抄送: Jon Mason <[email protected]>; Dave Jiang <[email protected]>; Allen Hubbe <[email protected]>; Serge Semin <[email protected]>; Dan Carpenter <[email protected]>; Jiasheng Jiang <[email protected]>; [email protected]; [email protected]; opensource.kernel <[email protected]> 主题: Re: 回复: [PATCH v3] ntb: Remove error checking for debugfs_create_dir()

Quoted 3 lines · 王明-软件底层技术部

Hi dan carpenter
Sorry to bother you again, Is there anything wrong with my patch? Can this patch be applied?

I'm not the NTB maintainer. I don't see a reason why it can't be applied but, please, wait for two weeks for maintainer feedback.

regards,
dan carpenter

maintainer Reviewed-by on v3 1/1
#5 lore raw
In reply to Wang Ming
Quoted 4 lines · Wang Ming

It is expected that most callers should _ignore_ the errors return by debugfs_create_dir() in tool_setup_dbgfs()

Quoted 17 lines
---
  drivers/ntb/test/ntb_tool.c | 2 --
  1 file changed, 2 deletions(-)
drivers/ntb/test/ntb_tool.c +0 -2
index eeeb4b1c97d2..e0acc11d29ba 100644
@@ -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);
#6 lore raw
In reply to Wang Ming
Quoted 2 lines

It is expected that most callers should _ignore_ the errors return by debugfs_create_dir() in tool_setup_dbgfs()

Please choose a corresponding imperative change suggestion.

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.5-rc1#n94

How do you think about to add the tag “Fixes” because of an omitted error detection?

Would a subject like “[PATCH v4] NTB: ntb_tool: Remove an error check in tool_setup_dbgfs()” be more appropriate?

Regards,
Markus

#7 lore raw

Markus is banned from vger so only people who are on the CC list can see his email. A number of maintainers have asked him to stop commenting on patches.

regards,
dan carpenter

#8 lore raw
Quoted 2 lines

Markus is banned from vger so only people who are on the CC list can see his email.

I hope that circumstances will evolve in ways which will help to reconsider this setting.

Quoted 2 lines

A number of maintainers have asked him to stop
commenting on patches.

Can remaining development concerns and communication difficulties be adjusted any further?

Regards,
Markus

Reviewed-by on v3 1/1
#9 lore raw
In reply to Wang Ming
Quoted 4 lines · Wang Ming

It is expected that most callers should _ignore_ the errors return by debugfs_create_dir() in tool_setup_dbgfs()

The patch itself is correct for sure:

As a side note IMO I would have converted the driver to successfully probe an NTB device only if DebugFS is enabled and all the DebugFS-nodes are successfully created. That's because the driver fully relies on the DebugFS nodes to activate its functionality. Without them being available it's absolutely useless. The way the test-driver is utilized is demonstrated for instance in the NTB-test script:
tools/testing/selftests/ntb/ntb_test.sh .

* It concerns all the NTB test drivers...

-Serge(y)

Quoted 20 lines
---
 drivers/ntb/test/ntb_tool.c | 2 --
 1 file changed, 2 deletions(-)
drivers/ntb/test/ntb_tool.c +0 -2
index eeeb4b1c97d2..e0acc11d29ba 100644
@@ -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);
Signature · 1 line
2.25.1
#10 lore raw
Quoted 2 lines
Quoted 2 lines

It is expected that most callers should _ignore_ the errors return by debugfs_create_dir() in tool_setup_dbgfs()

…

Quoted 2 lines

The patch itself is correct for sure:

How does such information fit to the Linux development requirement for imperative change descriptions?

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.5-rc1#n94

How do you think about to add the tag “Fixes” because of the deletion of an inappropriate error detection?

Regards,
Markus

#11 lore raw
Quoted 7 lines · Markus Elfring
Quoted 2 lines
Quoted 2 lines

It is expected that most callers should _ignore_ the errors return by debugfs_create_dir() in tool_setup_dbgfs()

…

Quoted 2 lines

The patch itself is correct for sure:

Quoted 5 lines

How does such information fit to the Linux development requirement for imperative change descriptions?

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.5-rc1#n94

Well, the patch author does follow that rule in the subject. Regarding the patch log body it is impossible to use the "imperative mood" always in the entire text. In this case the explanation is pretty much clear and doesn't use the patterns like "This patch", or any personal pronouns so IMO it's fine to have the log as is.

Quoted 4 lines

How do you think about to add the tag “Fixes” because of the deletion of an inappropriate error detection?

It doesn't fix any real bug. So there is no need in the tag.

-Serge(y)

Quoted 3 lines

Regards,
Markus

#12 lore raw
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

It is expected that most callers should _ignore_ the errors return by debugfs_create_dir() in tool_setup_dbgfs()

…

Quoted 2 lines

The patch itself is correct for sure:

Quoted 7 lines
Quoted 5 lines

How does such information fit to the Linux development requirement for imperative change descriptions?

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.5-rc1#n94

Well, the patch author does follow that rule in the subject.

Yes.

Would any other subsystem specification variant or patch title become preferred?

Quoted 3 lines

Regarding the
patch log body it is impossible to use the "imperative mood" always in the entire text.

This is usual.

Quoted 1 line

In this case the explanation is pretty much clear

A terse hint is provided.

I interpret the referenced Linux development documentation in the way that further imperative actions should be specified also in the “changelog”.

Quoted 2 lines

and doesn't
use the patterns like "This patch",

Such a wording occurred also in a few other patches by Vivo developers.

Quoted 1 line

, or any personal pronouns

This detail seems to be fine (in just one sentence here).

Quoted 2 lines

so IMO it's
fine to have the log as is.

I find the change description still improvable.

Quoted 4 lines
Quoted 2 lines

How do you think about to add the tag “Fixes” because of the deletion of an inappropriate error detection?

It doesn't fix any real bug. So there is no need in the tag.

Do you care if the previously used null pointer check was wrong (for the variable “tool_dbgfs_topdir”)?
https://elixir.bootlin.com/linux/v6.5-rc1/source/drivers/ntb/test/ntb_tool.c#L1485

Will the source code comment “This modules is useless without dbgfs...” be reconsidered any more?

Regards,
Markus

#13 lore raw
In reply to Markus Elfring
Quoted 9 lines · Markus Elfring
Quoted 2 lines
Quoted 2 lines

It is expected that most callers should _ignore_ the errors return by debugfs_create_dir() in tool_setup_dbgfs()

…

Quoted 2 lines

The patch itself is correct for sure:

How does such information fit to the Linux development requirement for imperative change descriptions?

Markus, you already replied to this thread.

Greg, HCH, Matthew Wilcox and Krzysztof Kozlowski have all asked you to stop. Those are respected kernel maintainers. You should listen to them.

If you see a bug, that's useful. But if you're just nitpicking the commit message, that's not useful. We have explained this many times as clearly as we know how.

Quoted 6 lines

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.5-rc1#n94

How do you think about to add the tag “Fixes” because of the deletion of an inappropriate error detection?

No. It's not a bug fix so a Fixes tag is innappropriate.

regards,
dan carpenter

#14 lore raw
Quoted 10 lines
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

It is expected that most callers should _ignore_ the errors return by debugfs_create_dir() in tool_setup_dbgfs()

…

Quoted 2 lines

The patch itself is correct for sure:

How does such information fit to the Linux development requirement for imperative change descriptions?

Markus, you already replied to this thread.

Yes.

Some patch versions were similarly affected.

Quoted 1 line

Greg, HCH, Matthew Wilcox and Krzysztof Kozlowski have all asked you to stop.

They responded in this way because of some communication factors (which might be unclear to some degree).

Quoted 1 line

Those are respected kernel maintainers.

Yes, of course.

Quoted 1 line

You should listen to them.

This happens.

But several development discussions provide opportunities for different ideas and corresponding advices.

Quoted 1 line

If you see a bug, that's useful.

The change acceptance can grow accordingly.

Quoted 2 lines

But if you're just nitpicking the
commit message, that's not useful.

I dare to present additional patch review concerns.

It seems that further contributors occasionally dare also to support such open issues.

Quoted 2 lines

We have explained this many times as
clearly as we know how.

We came along recurring communication concerns (for which a consensus is not directly achieved so far).

Quoted 8 lines
Quoted 6 lines

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.5-rc1#n94

How do you think about to add the tag “Fixes” because of the deletion of an inappropriate error detection?

No. It's not a bug fix so a Fixes tag is innappropriate.

Would you eventually prefer any other solution for the discussed patch approach?

Regards,
Markus