linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: zoned: convert comment to kernel-doc format
@ 2021-12-03  6:48 Randy Dunlap
  2021-12-07 19:48 ` David Sterba
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2021-12-03  6:48 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, kernel test robot, Naohiro Aota, David Sterba,
	Chris Mason, Josef Bacik, linux-btrfs

Complete kernel-doc notation for btrfs_zone_activate() to prevent
kernel-doc warnings:

zoned.c:1784: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
 * Activate block group and underlying device zones
zoned.c:1784: warning: missing initial short description on line:
 * Activate block group and underlying device zones

Fixes: afba2bc036b0 ("btrfs: zoned: implement active zone tracking")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Naohiro Aota <naohiro.aota@wdc.com>
Cc: David Sterba <dsterba@suse.com>
Cc: Chris Mason <clm@fb.com>
Cc: Josef Bacik <josef@toxicpanda.com>
Cc: linux-btrfs@vger.kernel.org
---
 fs/btrfs/zoned.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20211202.orig/fs/btrfs/zoned.c
+++ linux-next-20211202/fs/btrfs/zoned.c
@@ -1781,7 +1781,7 @@ struct btrfs_device *btrfs_zoned_get_dev
 }
 
 /**
- * Activate block group and underlying device zones
+ * btrfs_zone_activate - Activate block group and underlying device zones
  *
  * @block_group: the block group to activate
  *

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: zoned: convert comment to kernel-doc format
  2021-12-03  6:48 [PATCH] btrfs: zoned: convert comment to kernel-doc format Randy Dunlap
@ 2021-12-07 19:48 ` David Sterba
  2021-12-08  0:43   ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: David Sterba @ 2021-12-07 19:48 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, kernel test robot, Naohiro Aota, David Sterba,
	Chris Mason, Josef Bacik, linux-btrfs

On Thu, Dec 02, 2021 at 10:48:20PM -0800, Randy Dunlap wrote:
> Complete kernel-doc notation for btrfs_zone_activate() to prevent
> kernel-doc warnings:
> 
> zoned.c:1784: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>  * Activate block group and underlying device zones
> zoned.c:1784: warning: missing initial short description on line:
>  * Activate block group and underlying device zones

We've been using a slightly different format than the strict kernel-doc,
in this cas the function name is not repeated (because it's right under
the comment), what we want is the argument list checks (order and
completeness).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: zoned: convert comment to kernel-doc format
  2021-12-07 19:48 ` David Sterba
@ 2021-12-08  0:43   ` Randy Dunlap
  2021-12-08 13:56     ` David Sterba
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2021-12-08  0:43 UTC (permalink / raw)
  To: dsterba, linux-kernel, kernel test robot, Naohiro Aota,
	David Sterba, Chris Mason, Josef Bacik, linux-btrfs



On 12/7/21 11:48, David Sterba wrote:
> On Thu, Dec 02, 2021 at 10:48:20PM -0800, Randy Dunlap wrote:
>> Complete kernel-doc notation for btrfs_zone_activate() to prevent
>> kernel-doc warnings:
>>
>> zoned.c:1784: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>>  * Activate block group and underlying device zones
>> zoned.c:1784: warning: missing initial short description on line:
>>  * Activate block group and underlying device zones
> 
> We've been using a slightly different format than the strict kernel-doc,

I'm sorry to hear that.

> in this cas the function name is not repeated (because it's right under
> the comment), what we want is the argument list checks (order and
> completeness).

Please just eliminate/prevent the warning then.
I don't care how it's done.

thanks.
-- 
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: zoned: convert comment to kernel-doc format
  2021-12-08  0:43   ` Randy Dunlap
@ 2021-12-08 13:56     ` David Sterba
  0 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2021-12-08 13:56 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: dsterba, linux-kernel, kernel test robot, Naohiro Aota,
	David Sterba, Chris Mason, Josef Bacik, linux-btrfs, nborisov

On Tue, Dec 07, 2021 at 04:43:15PM -0800, Randy Dunlap wrote:
> On 12/7/21 11:48, David Sterba wrote:
> > On Thu, Dec 02, 2021 at 10:48:20PM -0800, Randy Dunlap wrote:
> >> Complete kernel-doc notation for btrfs_zone_activate() to prevent
> >> kernel-doc warnings:
> >>
> >> zoned.c:1784: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> >>  * Activate block group and underlying device zones
> >> zoned.c:1784: warning: missing initial short description on line:
> >>  * Activate block group and underlying device zones
> > 
> > We've been using a slightly different format than the strict kernel-doc,
> 
> I'm sorry to hear that.

I feels like the kdoc format is meant for generating documentation and
has some requirements that I do not consider too human friendly, like
mandating the function name AND the function description on the first
line no matter how long it is. I'd rather have something for developers
where first line is summary of what the function does and list of
parameters to verify.

> > in this cas the function name is not repeated (because it's right under
> > the comment), what we want is the argument list checks (order and
> > completeness).
> 
> Please just eliminate/prevent the warning then.
> I don't care how it's done.

It used to work and got changed/broken in 52042e2db452 ("scripts:
kernel-doc: validate kernel-doc markup with the actual names"), we
actually wanted to enable kdoc checks by default in our local Makefile.

We were working on that with Nikolay and he asked Mauro if the function
name could be optional. No answer so we get the warnings.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-08 13:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03  6:48 [PATCH] btrfs: zoned: convert comment to kernel-doc format Randy Dunlap
2021-12-07 19:48 ` David Sterba
2021-12-08  0:43   ` Randy Dunlap
2021-12-08 13:56     ` David Sterba

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 NNTP newsgroup(s).