[PATCH] nvme-tcp.h: correct kernel-doc comments

Randy Dunlap posted 1 patch 3 weeks, 5 days ago
include/linux/nvme-tcp.h |    8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
[PATCH] nvme-tcp.h: correct kernel-doc comments
Posted by Randy Dunlap 3 weeks, 5 days ago
Mark reserved fields as "private:" so that kernel-doc comments are
not required for them.
Add comments for @feil and @feih since @fei was split into 2 fields
because @fei is not 4-byte aligned.
These changes eliminate all kernel-doc warnings in nvme-tcp.h.

Warning: include/linux/nvme-tcp.h:95 struct member 'rsvd2' not described
 in 'nvme_tcp_icreq_pdu'
Warning: include/linux/nvme-tcp.h:113 struct member 'rsvd' not described
 in 'nvme_tcp_icresp_pdu'
Warning: include/linux/nvme-tcp.h:128 struct member 'feil' not described
 in 'nvme_tcp_term_pdu'
Warning: include/linux/nvme-tcp.h:128 struct member 'feiu' not described
 in 'nvme_tcp_term_pdu'
Warning: include/linux/nvme-tcp.h:128 struct member 'rsvd' not described
 in 'nvme_tcp_term_pdu'
Warning: include/linux/nvme-tcp.h:131 struct member 'rsvd' not described
 in 'nvme_tcp_term_pdu'
Warning: include/linux/nvme-tcp.h:169 struct member 'rsvd' not described
 in 'nvme_tcp_r2t_pdu'
Warning: include/linux/nvme-tcp.h:187 struct member 'rsvd' not described
 in 'nvme_tcp_data_pdu'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
Cc: Keith Busch <kbusch@kernel.org>
Cc: Jens Axboe <axboe@fb.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: linux-nvme@lists.infradead.org

 include/linux/nvme-tcp.h |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- linux-next-20260311.orig/include/linux/nvme-tcp.h
+++ linux-next-20260311/include/linux/nvme-tcp.h
@@ -92,6 +92,7 @@ struct nvme_tcp_icreq_pdu {
 	__u8			hpda;
 	__u8			digest;
 	__le32			maxr2t;
+	/* private: */
 	__u8			rsvd2[112];
 };
 
@@ -110,6 +111,7 @@ struct nvme_tcp_icresp_pdu {
 	__u8			cpda;
 	__u8			digest;
 	__le32			maxdata;
+	/* private: */
 	__u8			rsvd[112];
 };
 
@@ -118,13 +120,15 @@ struct nvme_tcp_icresp_pdu {
  *
  * @hdr:           pdu common header
  * @fes:           fatal error status
- * @fei:           fatal error information
+ * @feil:          fatal error information (low 16 bits)
+ * @feiu:          fatal error information (high 16 bits)
  */
 struct nvme_tcp_term_pdu {
 	struct nvme_tcp_hdr	hdr;
 	__le16			fes;
 	__le16			feil;
 	__le16			feiu;
+	/* private: */
 	__u8			rsvd[10];
 };
 
@@ -166,6 +170,7 @@ struct nvme_tcp_r2t_pdu {
 	__u16			ttag;
 	__le32			r2t_offset;
 	__le32			r2t_length;
+	/* private: */
 	__u8			rsvd[4];
 };
 
@@ -184,6 +189,7 @@ struct nvme_tcp_data_pdu {
 	__u16			ttag;
 	__le32			data_offset;
 	__le32			data_length;
+	/* private: */
 	__u8			rsvd[4];
 };
Re: [PATCH] nvme-tcp.h: correct kernel-doc comments
Posted by Christoph Hellwig 3 weeks, 5 days ago
On Wed, Mar 11, 2026 at 10:14:31PM -0700, Randy Dunlap wrote:
> Mark reserved fields as "private:" so that kernel-doc comments are
> not required for them.

I'm honestly not sure the kerneldoc makes any sense for an on-disk
structure that has an external specification.  So insteada of these
hacks, what about just dropping the kerneldoc comment entirely?
Re: [PATCH] nvme-tcp.h: correct kernel-doc comments
Posted by Randy Dunlap 3 weeks, 4 days ago

On 3/12/26 12:03 AM, Christoph Hellwig wrote:
> On Wed, Mar 11, 2026 at 10:14:31PM -0700, Randy Dunlap wrote:
>> Mark reserved fields as "private:" so that kernel-doc comments are
>> not required for them.
> 
> I'm honestly not sure the kerneldoc makes any sense for an on-disk
> structure that has an external specification.  So insteada of these
> hacks, what about just dropping the kerneldoc comment entirely?
> 

Sure, I'll do that.
Thanks.

-- 
~Randy