~lkcamp/patches

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Add information on checkpatch warning about `help` in modules

Gabriela Bittencourt <gbittencourt@lkcamp.dev>
Details
Message ID
<20240928234649.193664-1-gbittencourt@lkcamp.dev>
DKIM signature
pass
Download raw message
Patch: +1 -1
Add lines number information to warning of `module help` on Kconfig.
On the creation of a new module, if `help` section is smaller than 4
lines, checkpatch.pl gives a warning asking for a fully description. So
add the information of the minimal required lines to be considered a
fully description.

Signed-off-by: Gabriela Bittencourt <gbittencourt@lkcamp.dev>
---

Hi all,

I'm kind of new at linux development and I'm not sure if that's the best
solution. It is just an easy one that I found that fixes the problem.
If it should not be done as I proposed, I will be happy to change the
solution.

:)

 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4427572b2477..8a6b6c22b175 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3660,7 +3660,7 @@ sub process {
			    $help_length < $min_conf_desc_length) {
				my $stat_real = get_stat_real($linenr, $ln - 1);
				WARN("CONFIG_DESCRIPTION",
				     "please write a help paragraph that fully describes the config symbol\n" . "$here\n$stat_real\n");
				     "please write a help paragraph with at least $min_conf_desc_length lines that fully describes the config symbol\n" . "$here\n$stat_real\n");
			}
		}

2.46.2
André Almeida <andrealmeid@riseup.net>
Details
Message ID
<1bd0064c-d0ec-415b-9b86-47df5c13e620@riseup.net>
In-Reply-To
<20240928234649.193664-1-gbittencourt@lkcamp.dev> (view parent)
DKIM signature
pass
Download raw message
Hey Gabriela!

You forgot the prefix "checkpatch: " at your commit message.

Em 28/09/2024 20:46, Gabriela Bittencourt escreveu:
> Add lines number information to warning of `module help` on Kconfig.
> On the creation of a new module, if `help` section is smaller than 4
> lines, checkpatch.pl gives a warning asking for a fully description. So
> add the information of the minimal required lines to be considered a
> fully description.
> 

I think the way is described could be more clear... maybe you could 
start by stating the problem, and then describing your solution. It 
should be clear why this change is needed and helpful. I would write 
something like this:

---
When writing a short help paragraph for a new KConfig option, developers 
are prompted the following warning:

    please write a help paragraph that fully describes the config symbol

However, developers might get confused about this message, giving that 
they do have written a help paragraph, but checkpatch is not happy about 
it, which can be perceived as a false positive. That happens because 
checkpatch considers a fully descriptive paragraph one if at least 
`$min_conf_desc_length` lines (as of now, 4 lines).

To make the warning more clear, output in the message the expected 
length of the paragraph, so developers know better what checkpatch wants 
from them.
---

Thanks!
	André
Reply to thread Export thread (mbox)