From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: Re: [GIT PULL for v4.21] second set of media patches: ipu3 driver
Date: Wed, 26 Dec 2018 09:43:57 -0200 [thread overview]
Message-ID: <20181226094357.293fdd97@coco.lan> (raw)
In-Reply-To: <CAHk-=wiqS_ShU4th7mKd4kLEXaKKyrnK5FkyJgdy=_=_wy1KGg@mail.gmail.com>
Em Tue, 25 Dec 2018 13:12:58 -0800
Linus Torvalds <torvalds@linux-foundation.org> escreveu:
> On Thu, Dec 20, 2018 at 4:45 AM Mauro Carvalho Chehab
> <mchehab+samsung@kernel.org> wrote:
> >
> > Also, it would be good if you merge first the docs-next pull request from
> > Jon, as otherwise, you'll see some warnings when building documentation,
> > due to an issue at scripts/kernel-doc, whose fix is at documentation tree.
>
> I don't seem to have that in my pile of pull requests, so docs
> creation will warn for a bit. Not a huge deal.
Yeah, we can live without that for a while. In any case, the patch that
fixes it is this one:
3d9bfb19bd70 ("scripts/kernel-doc: Fix struct and struct field attribute processing")
I'm enclosing it as a reference (as seen at Jon's docs-next tree). It is
probably worth to just wait for Jon's pull request.
Thanks,
Mauro
From: Sakari Ailus <sakari.ailus@linux.intel.com>
Date: Thu, 22 Nov 2018 13:06:04 +0200
Subject: [PATCH] scripts/kernel-doc: Fix struct and struct field attribute
processing
The kernel-doc attempts to clear the struct and struct member attributes
from the API documentation it produces. It falls short of the job in the
following respects:
- extra whitespaces are left where __attribute__((...)) was removed,
- only a single attribute is removed per struct,
- attributes (such as aligned) containing numbers were not removed,
- attributes are only cleared from struct fields, not structs themselves.
This patch addresses these issues by removing the attributes.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index f9f143145c4b..c5333d251985 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1062,7 +1062,7 @@ sub dump_struct($$) {
my $x = shift;
my $file = shift;
- if ($x =~ /(struct|union)\s+(\w+)\s*\{(.*)\}/) {
+ if ($x =~ /(struct|union)\s+(\w+)\s*\{(.*)\}(\s*(__packed|__aligned|__attribute__\s*\(\([a-z0-9,_\s\(\)]*\)\)))*/) {
my $decl_type = $1;
$declaration_name = $2;
my $members = $3;
@@ -1073,8 +1073,9 @@ sub dump_struct($$) {
# strip comments:
$members =~ s/\/\*.*?\*\///gos;
# strip attributes
- $members =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//i;
- $members =~ s/__aligned\s*\([^;]*\)//gos;
+ $members =~ s/\s*__attribute__\s*\(\([a-z0-9,_\*\s\(\)]*\)\)//gi;
+ $members =~ s/\s*__aligned\s*\([^;]*\)//gos;
+ $members =~ s/\s*__packed\s*//gos;
$members =~ s/\s*CRYPTO_MINALIGN_ATTR//gos;
# replace DECLARE_BITMAP
$members =~ s/DECLARE_BITMAP\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
next prev parent reply other threads:[~2018-12-26 11:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-20 12:45 [GIT PULL for v4.21] second set of media patches: ipu3 driver Mauro Carvalho Chehab
2018-12-25 21:12 ` Linus Torvalds
2018-12-26 11:43 ` Mauro Carvalho Chehab [this message]
2018-12-25 23:20 ` pr-tracker-bot
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=20181226094357.293fdd97@coco.lan \
--to=mchehab+samsung@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=torvalds@linux-foundation.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