From: Randy Dunlap <rdunlap@infradead.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-pci <linux-pci@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pci: fix kernel-doc build warning
Date: Mon, 6 Nov 2017 16:50:53 -0800 [thread overview]
Message-ID: <e756ace6-f821-db39-5a3b-11192ae55803@infradead.org> (raw)
In-Reply-To: <20171107003355.GE9538@bhelgaas-glaptop.roam.corp.google.com>
On 11/06/2017 04:33 PM, Bjorn Helgaas wrote:
> On Sun, Oct 29, 2017 at 05:07:11PM -0700, Randy Dunlap wrote:
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> Fix build error in kernel-doc notation:
>>
>> ../drivers/pci/pci.c:3479: ERROR: Unexpected indentation.
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Bjorn Helgaas <bhelgaas@google.com>
>> Cc: linux-pci@vger.kernel.org
>> ---
>> drivers/pci/pci.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- lnx-414-rc7.orig/drivers/pci/pci.c
>> +++ lnx-414-rc7/drivers/pci/pci.c
>> @@ -3471,7 +3471,7 @@ EXPORT_SYMBOL(devm_pci_remap_cfgspace);
>> * All operations are managed and will be undone on driver detach.
>> *
>> * Returns a pointer to the remapped memory or an ERR_PTR() encoded error code
>> - * on failure. Usage example:
>> + * on failure. Usage example::
>
> I don't understand what's going on here. Apparently there's something
> special about two colons? I saw plenty of double colons in
> Documentation/, but I couldn't quickly find out what it means.
Sorry about my terseness. The ending colon is not the problem.
The problem is in indentation in the example code, and changing to use
"::" tells the kernel-doc "reStructuredText" processor that the following
block is a literal block of some blob that should be kept as is.
> If kernel-doc thinks "example:" is a mistake, maybe we could recast
> the sentence as "Example usage:"? Putting a double colon here makes
> the text look like a mistake to this human reader.
>
>> *
>> * res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> * base = devm_pci_remap_cfg_resource(&pdev->dev, res);
>>
Like you said, there will be lots of these "::" in source files.
There is one slight alternate, if it looks any better to you, to put the
"::" on a line by itself, like so:
* Returns a pointer to the remapped memory or an ERR_PTR() encoded error code
* on failure. Usage example:
*::
*
* res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
* base = devm_pci_remap_cfg_resource(&pdev->dev, res);
* if (IS_ERR(base))
* return PTR_ERR(base);
*/
I can resend the patch like that if you prefer it.
thanks,
--
~Randy
next prev parent reply other threads:[~2017-11-07 0:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-30 0:07 [PATCH] pci: fix kernel-doc build warning Randy Dunlap
2017-11-07 0:33 ` Bjorn Helgaas
2017-11-07 0:50 ` Randy Dunlap [this message]
2017-11-08 23:27 ` Bjorn Helgaas
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=e756ace6-f821-db39-5a3b-11192ae55803@infradead.org \
--to=rdunlap@infradead.org \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/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).