linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Linga, Pavan Kumar" <pavan.kumar.linga@intel.com>
To: Jonathan Corbet <corbet@lwn.net>, <netdev@vger.kernel.org>,
	<kuba@kernel.org>
Cc: <linux-doc@vger.kernel.org>, <emil.s.tantilov@intel.com>,
	<joshua.a.hay@intel.com>, <sridhar.samudrala@intel.com>,
	<alan.brady@intel.com>, <madhu.chittim@intel.com>,
	<jesse.brandeburg@intel.com>, <anthony.l.nguyen@intel.com>,
	<willemb@google.com>, <decot@google.com>, <rdunlap@infradead.org>
Subject: Re: [PATCH net-next v2 1/2] scripts: kernel-doc: parse DEFINE_DMA_UNMAP_[ADDR|LEN]
Date: Mon, 14 Aug 2023 14:13:24 -0700	[thread overview]
Message-ID: <5b6d4e1c-aaa1-b73e-0360-3cf6893bbaf8@intel.com> (raw)
In-Reply-To: <87y1idv4du.fsf@meer.lwn.net>



On 8/14/2023 11:57 AM, Jonathan Corbet wrote:
> Pavan Kumar Linga <pavan.kumar.linga@intel.com> writes:
> 
>> At present, if the macros DEFINE_DMA_UNMAP_ADDR() and
>> DEFINE_DMA_UNMAP_LEN() are used in the structures as shown
>> below, instead of parsing the parameter in the parentheses,
>> kernel-doc parses 'DEFINE_DMA_UNMAP_ADDR(' and
>> 'DEFINE_DMA_UNMAP_LEN(' which results in the following
>> warnings:
>>
>> drivers/net/ethernet/intel/idpf/idpf_txrx.h:201: warning: Function
>> parameter or member 'DEFINE_DMA_UNMAP_ADDR(dma' not described in
>> 'idpf_tx_buf'
>> drivers/net/ethernet/intel/idpf/idpf_txrx.h:201: warning: Function
>> parameter or member 'DEFINE_DMA_UNMAP_LEN(len' not described in
>> 'idpf_tx_buf'
>>
>> struct idpf_tx_buf {
>> 	DEFINE_DMA_UNMAP_ADDR(dma);
>> 	DEFINE_DMA_UNMAP_LEN(len);
>> };
>>
>> Fix the warnings by parsing DEFINE_DMA_UNMAP_ADDR() and
>> DEFINE_DMA_UNMAP_LEN().
>>
>> Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
>> Acked-by: Randy Dunlap <rdunlap@infradead.org>
>> ---
>>   scripts/kernel-doc | 4 ++++
>>   1 file changed, 4 insertions(+)
> 
> Is there a reason why you didn't CC me on these?
> 

It was unintentional and my apologies, as I thought CC'ing you while 
sending the patches should be good. If the ask is to add the 'Cc:' tag 
to the patch, will do that in the next revision.

>> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
>> index d0116c6939dc..cfb1cb223508 100755
>> --- a/scripts/kernel-doc
>> +++ b/scripts/kernel-doc
>> @@ -1168,6 +1168,10 @@ sub dump_struct($$) {
>>   	$members =~ s/DECLARE_KFIFO_PTR\s*\($args,\s*$args\)/$2 \*$1/gos;
>>   	# replace DECLARE_FLEX_ARRAY
>>   	$members =~ s/(?:__)?DECLARE_FLEX_ARRAY\s*\($args,\s*$args\)/$1 $2\[\]/gos;
>> +	#replace DEFINE_DMA_UNMAP_ADDR
>> +	$members =~ s/DEFINE_DMA_UNMAP_ADDR\s*\($args\)/dma_addr_t $1/gos;
>> +	#replace DEFINE_DMA_UNMAP_LEN
>> +	$members =~ s/DEFINE_DMA_UNMAP_LEN\s*\($args\)/__u32 $1/gos;
>>   	my $declaration = $members;
> 
> I'm not happy with this ... we are continuing to reimplement parts of
> the C preprocessor here, badly, creating an ugly mess in the process.
> 
> That said, you are just the latest arrival at the party, can't blame you
> for this.  Until we come up with a better way here, I guess this will
> do.
> 

Thanks for providing your feedback.

> Thanks,
> 
> jon

Regards,
Pavan

  reply	other threads:[~2023-08-14 21:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14 17:07 [PATCH net-next v2 0/2] Fix invalid kernel-doc warnings Pavan Kumar Linga
2023-08-14 17:07 ` [PATCH net-next v2 1/2] scripts: kernel-doc: parse DEFINE_DMA_UNMAP_[ADDR|LEN] Pavan Kumar Linga
2023-08-14 18:57   ` Jonathan Corbet
2023-08-14 21:13     ` Linga, Pavan Kumar [this message]
2023-08-14 17:07 ` [PATCH net-next v2 2/2] scripts: kernel-doc: fix macro handling in enums Pavan Kumar Linga
2023-08-14 18:59   ` Jonathan Corbet
2023-08-15  0:45     ` Linga, Pavan Kumar
2023-08-14 19:01 ` [PATCH net-next v2 0/2] Fix invalid kernel-doc warnings Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5b6d4e1c-aaa1-b73e-0360-3cf6893bbaf8@intel.com \
    --to=pavan.kumar.linga@intel.com \
    --cc=alan.brady@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=corbet@lwn.net \
    --cc=decot@google.com \
    --cc=emil.s.tantilov@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=joshua.a.hay@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=madhu.chittim@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=sridhar.samudrala@intel.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).