Skip to contentSkip to conversation

ata: libata: avoid kernel-doc warnings

PATCH Applied Randy Dunlap 2 participants 7 messages Jul 25 – Jul 27 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: libata: avoid kernel-doc warnings

Modify comments to prevent kernel-doc warnings:
- use "/*" for a non-kernel-doc comment
- add a Returns: section for ata_id_major_version()

Warning: include/linux/ata.h:770 Cannot find identifier on line:
*
Warning: include/linux/ata.h:782 function parameter 'id' not described in 'ata_id_sct_data_tables'
Warning: include/linux/ata.h:782 expecting prototype for Word(). Prototype was for ata_id_sct_data_tables() instead
Warning: include/linux/ata.h:820 No description found for return value of 'ata_id_major_version'

---
Cc: Damien Le Moal <[email protected]>
Cc: Niklas Cassel <[email protected]>
Cc: [email protected]

 include/linux/ata.h |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
include/linux/ata.h +3 -2
@@ -767,8 +767,7 @@ static inline bool ata_id_sense_reportin
 	return id[ATA_ID_COMMAND_SET_4] & BIT(6);
 }
 
-/**
- *
+/*
  * Word: 206 - SCT Command Transport
  *    15:12 - Vendor Specific
  *     11:6 - Reserved
@@ -815,6 +814,8 @@ static inline bool ata_id_sct_supported(
  *
  *	The practical impact of this is that ata_id_major_version cannot
  *	reliably report on drives below ATA3.
+ *
+ *	Returns: major version of ATA drive level or %0 if unknown
  */
 
 static inline unsigned int ata_id_major_version(const u16 *id)
maintainer
#1 lore raw
Quoted 32 lines · Randy Dunlap

Modify comments to prevent kernel-doc warnings:
- use "/*" for a non-kernel-doc comment
- add a Returns: section for ata_id_major_version()

Warning: include/linux/ata.h:770 Cannot find identifier on line:
*
Warning: include/linux/ata.h:782 function parameter 'id' not described in 'ata_id_sct_data_tables'
Warning: include/linux/ata.h:782 expecting prototype for Word(). Prototype was for ata_id_sct_data_tables() instead
Warning: include/linux/ata.h:820 No description found for return value of 'ata_id_major_version'

---
Cc: Damien Le Moal <[email protected]>
Cc: Niklas Cassel <[email protected]>
Cc: [email protected]

 include/linux/ata.h |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
include/linux/ata.h +1 -2
@@ -767,8 +767,7 @@ static inline bool ata_id_sense_reportin
 	return id[ATA_ID_COMMAND_SET_4] & BIT(6);
 }
 
-/**
- *
+/*
  * Word: 206 - SCT Command Transport
  *    15:12 - Vendor Specific
  *     11:6 - Reserved

include/linux/ata.h static inline bool ata_id_sct_supported( · line 818

Quoted 5 lines
include/linux/ata.h +2 -0
@@ -815,6 +814,8 @@ static inline bool ata_id_sct_supported(
  *
  *	The practical impact of this is that ata_id_major_version cannot
  *	reliably report on drives below ATA3.
+ *
+ *	Returns: major version of ATA drive level or %0 if unknown

Is the "%0% here intentional ? If yes, why ? Or is it a typo? If it is the latter, I can fix when applying.

Quoted 3 lines
include/linux/ata.h +0 -0
  */
 
 static inline unsigned int ata_id_major_version(const u16 *id)
Signature · 2 lines
Damien Le Moal
Western Digital Research
#2 lore raw
Quoted 26 lines · Damien Le Moal
Quoted 25 lines · Randy Dunlap

Modify comments to prevent kernel-doc warnings:
- use "/*" for a non-kernel-doc comment
- add a Returns: section for ata_id_major_version()

Warning: include/linux/ata.h:770 Cannot find identifier on line:
*
Warning: include/linux/ata.h:782 function parameter 'id' not described in 'ata_id_sct_data_tables'
Warning: include/linux/ata.h:782 expecting prototype for Word(). Prototype was for ata_id_sct_data_tables() instead
Warning: include/linux/ata.h:820 No description found for return value of 'ata_id_major_version'

---
Cc: Damien Le Moal <[email protected]>
Cc: Niklas Cassel <[email protected]>
Cc: [email protected]

 include/linux/ata.h |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
include/linux/ata.h +0 -0
@@ -767,8 +767,7 @@ static inline bool ata_id_sense_reportin
 	return id[ATA_ID_COMMAND_SET_4] & BIT(6);
 }
 
Quoted 15 lines

include/linux/ata.h static inline bool ata_id_sct_supported( · line 818

Quoted 12 lines
include/linux/ata.h +3 -2
-/**
- *
+/*
  * Word: 206 - SCT Command Transport
  *    15:12 - Vendor Specific
  *     11:6 - Reserved
@@ -815,6 +814,8 @@ static inline bool ata_id_sct_supported(
  *
  *	The practical impact of this is that ata_id_major_version cannot
  *	reliably report on drives below ATA3.
+ *
+ *	Returns: major version of ATA drive level or %0 if unknown

Is the "%0% here intentional ? If yes, why ? Or is it a typo? If it is the latter, I can fix when applying.

It indicates to kernel-doc that it's a constant and should be printed in code/monospace style.
But it's perfectly OK to drop it if you prefer that.

thanks.

Quoted 5 lines
Quoted 3 lines
include/linux/ata.h +0 -0
  */
 
 static inline unsigned int ata_id_major_version(const u16 *id)
Signature · 1 line
~Randy
maintainer
#3 lore raw
Quoted 45 lines · Randy Dunlap
Quoted 26 lines · Damien Le Moal
Quoted 25 lines · Randy Dunlap

Modify comments to prevent kernel-doc warnings:
- use "/*" for a non-kernel-doc comment
- add a Returns: section for ata_id_major_version()

Warning: include/linux/ata.h:770 Cannot find identifier on line:
*
Warning: include/linux/ata.h:782 function parameter 'id' not described in 'ata_id_sct_data_tables'
Warning: include/linux/ata.h:782 expecting prototype for Word(). Prototype was for ata_id_sct_data_tables() instead
Warning: include/linux/ata.h:820 No description found for return value of 'ata_id_major_version'

---
Cc: Damien Le Moal <[email protected]>
Cc: Niklas Cassel <[email protected]>
Cc: [email protected]

 include/linux/ata.h |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
include/linux/ata.h +0 -0
@@ -767,8 +767,7 @@ static inline bool ata_id_sense_reportin
 	return id[ATA_ID_COMMAND_SET_4] & BIT(6);
 }
 
Quoted 15 lines

include/linux/ata.h static inline bool ata_id_sct_supported( · line 818

Quoted 12 lines
include/linux/ata.h +3 -2
-/**
- *
+/*
  * Word: 206 - SCT Command Transport
  *    15:12 - Vendor Specific
  *     11:6 - Reserved
@@ -815,6 +814,8 @@ static inline bool ata_id_sct_supported(
  *
  *	The practical impact of this is that ata_id_major_version cannot
  *	reliably report on drives below ATA3.
+ *
+ *	Returns: major version of ATA drive level or %0 if unknown

Is the "%0% here intentional ? If yes, why ? Or is it a typo? If it is the latter, I can fix when applying.

Quoted 3 lines

It indicates to kernel-doc that it's a constant and should be printed in code/monospace style.
But it's perfectly OK to drop it if you prefer that.

Well, given that the patch is all about *not* having that comment as a kernel doc, I would prefer staying consistent with this goals and not use kernel docs markings. I will remove it if you agree.
Thanks!

Signature · 2 lines
Damien Le Moal
Western Digital Research
#4 lore raw
Quoted 46 lines · Damien Le Moal
Quoted 45 lines · Randy Dunlap
Quoted 41 lines · Damien Le Moal
Quoted 32 lines · Randy Dunlap

Modify comments to prevent kernel-doc warnings:
- use "/*" for a non-kernel-doc comment
- add a Returns: section for ata_id_major_version()

Warning: include/linux/ata.h:770 Cannot find identifier on line:
*
Warning: include/linux/ata.h:782 function parameter 'id' not described in 'ata_id_sct_data_tables'
Warning: include/linux/ata.h:782 expecting prototype for Word(). Prototype was for ata_id_sct_data_tables() instead
Warning: include/linux/ata.h:820 No description found for return value of 'ata_id_major_version'

---
Cc: Damien Le Moal <[email protected]>
Cc: Niklas Cassel <[email protected]>
Cc: [email protected]

 include/linux/ata.h |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
include/linux/ata.h +1 -2
@@ -767,8 +767,7 @@ static inline bool ata_id_sense_reportin
 	return id[ATA_ID_COMMAND_SET_4] & BIT(6);
 }
 
-/**
- *
+/*
  * Word: 206 - SCT Command Transport
  *    15:12 - Vendor Specific
  *     11:6 - Reserved

include/linux/ata.h static inline bool ata_id_sct_supported( · line 818

Quoted 5 lines
include/linux/ata.h +2 -0
@@ -815,6 +814,8 @@ static inline bool ata_id_sct_supported(
  *
  *	The practical impact of this is that ata_id_major_version cannot
  *	reliably report on drives below ATA3.
+ *
+ *	Returns: major version of ATA drive level or %0 if unknown

Is the "%0% here intentional ? If yes, why ? Or is it a typo? If it is the latter, I can fix when applying.

Quoted 8 lines
Quoted 3 lines

It indicates to kernel-doc that it's a constant and should be printed in code/monospace style.
But it's perfectly OK to drop it if you prefer that.

Well, given that the patch is all about *not* having that comment as a kernel doc, I would prefer staying consistent with this goals and not use kernel docs markings. I will remove it if you agree.
Thanks!

Yes, I see now. Please drop the '%'.
Thanks.

Signature · 1 line
~Randy
maintainer
#5 lore raw
Quoted 53 lines · Randy Dunlap
Quoted 50 lines · Damien Le Moal
Quoted 48 lines · Randy Dunlap
Quoted 26 lines · Damien Le Moal
Quoted 25 lines · Randy Dunlap

Modify comments to prevent kernel-doc warnings:
- use "/*" for a non-kernel-doc comment
- add a Returns: section for ata_id_major_version()

Warning: include/linux/ata.h:770 Cannot find identifier on line:
*
Warning: include/linux/ata.h:782 function parameter 'id' not described in 'ata_id_sct_data_tables'
Warning: include/linux/ata.h:782 expecting prototype for Word(). Prototype was for ata_id_sct_data_tables() instead
Warning: include/linux/ata.h:820 No description found for return value of 'ata_id_major_version'

---
Cc: Damien Le Moal <[email protected]>
Cc: Niklas Cassel <[email protected]>
Cc: [email protected]

 include/linux/ata.h |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
include/linux/ata.h +0 -0
@@ -767,8 +767,7 @@ static inline bool ata_id_sense_reportin
 	return id[ATA_ID_COMMAND_SET_4] & BIT(6);
 }
 
Quoted 15 lines

include/linux/ata.h static inline bool ata_id_sct_supported( · line 818

Quoted 12 lines
include/linux/ata.h +3 -2
-/**
- *
+/*
  * Word: 206 - SCT Command Transport
  *    15:12 - Vendor Specific
  *     11:6 - Reserved
@@ -815,6 +814,8 @@ static inline bool ata_id_sct_supported(
  *
  *	The practical impact of this is that ata_id_major_version cannot
  *	reliably report on drives below ATA3.
+ *
+ *	Returns: major version of ATA drive level or %0 if unknown

Is the "%0% here intentional ? If yes, why ? Or is it a typo? If it is the latter, I can fix when applying.

It indicates to kernel-doc that it's a constant and should be printed in code/monospace style.
But it's perfectly OK to drop it if you prefer that.

Quoted 6 lines
Quoted 4 lines

Well, given that the patch is all about *not* having that comment as a kernel doc, I would prefer staying consistent with this goals and not use kernel docs markings. I will remove it if you agree.
Thanks!

Yes, I see now. Please drop the '%'.

I completely misread this patch: the %0 is fine since that is in the kdoc for ata_id_major_version(), so all good. My apologies for the noise.

Signature · 2 lines
Damien Le Moal
Western Digital Research
maintainer Applied
#6 lore raw
In reply to Randy Dunlap
Quoted 11 lines · Randy Dunlap

Modify comments to prevent kernel-doc warnings:
- use "/*" for a non-kernel-doc comment
- add a Returns: section for ata_id_major_version()

Warning: include/linux/ata.h:770 Cannot find identifier on line:
*
Warning: include/linux/ata.h:782 function parameter 'id' not described in 'ata_id_sct_data_tables'
Warning: include/linux/ata.h:782 expecting prototype for Word(). Prototype was for ata_id_sct_data_tables() instead
Warning: include/linux/ata.h:820 No description found for return value of 'ata_id_major_version'

Applied to for-7.2-fixes with the comment tweak we discussed. Thanks!

Signature · 2 lines
Damien Le Moal
Western Digital Research