From: Charlemagne Lasse <charlemagnelasse@gmail.com>
To: Barry Song <21cnbao@gmail.com>, Jonathan Corbet <corbet@lwn.net>,
workflows@vger.kernel.org, linux-doc@vger.kernel.org,
Andy Whitcroft <apw@canonical.com>,
Joe Perches <joe@perches.com>,
Dwaipayan Ray <dwaipayanray1@gmail.com>,
lukas.bulwahn@gmail.com
Cc: LKML <linux-kernel@vger.kernel.org>,
Xining Xu <ma.xxn@outlook.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v3 2/2] scripts: checkpatch: check unused parameters for function-like macro
Date: Sat, 30 Mar 2024 00:08:02 +0100 [thread overview]
Message-ID: <CAFGhKbz70E3vihRkG4Hi20Tw8i7mGp=Z6j+NnELDTJd9cj9+Aw@mail.gmail.com> (raw)
Hi,
Can this patch please be dropped from Linux-next (currently via
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm#mm-everything)?
It is obviously wrong when dealing with named variadic macro
parameters:
./scripts/checkpatch.pl -f include/linux/rculist.h
ERROR: Parameter 'dummy' is not used in function-like macro, please
use static inline instead
#51: FILE: include/linux/rculist.h:51:
+#define __list_check_rcu(dummy, cond, extra...)
\
+ ({ \
+ check_arg_count_one(extra); \
+ RCU_LOCKDEP_WARN(!(cond) && !rcu_read_lock_any_held(), \
+ "RCU-list traversed in non-reader section!"); \
+ })
ERROR: Parameter 'extra...' is not used in function-like macro, please
use static inline instead
#51: FILE: include/linux/rculist.h:51:
+#define __list_check_rcu(dummy, cond, extra...)
\
+ ({ \
+ check_arg_count_one(extra); \
+ RCU_LOCKDEP_WARN(!(cond) && !rcu_read_lock_any_held(), \
+ "RCU-list traversed in non-reader section!"); \
+ })
ERROR: Parameter 'dummy' is not used in function-like macro, please
use static inline instead
#64: FILE: include/linux/rculist.h:64:
+#define __list_check_rcu(dummy, cond, extra...)
\
+ ({ check_arg_count_one(extra); })
ERROR: Parameter 'cond' is not used in function-like macro, please use
static inline instead
#64: FILE: include/linux/rculist.h:64:
+#define __list_check_rcu(dummy, cond, extra...)
\
+ ({ check_arg_count_one(extra); })
ERROR: Parameter 'extra...' is not used in function-like macro, please
use static inline instead
#64: FILE: include/linux/rculist.h:64:
+#define __list_check_rcu(dummy, cond, extra...)
\
+ ({ check_arg_count_one(extra); })
next reply other threads:[~2024-03-29 23:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-29 23:08 Charlemagne Lasse [this message]
2024-03-30 2:49 ` [PATCH v3 2/2] scripts: checkpatch: check unused parameters for function-like macro Joe Perches
-- strict thread matches above, loose matches on Subject: below --
2024-03-22 8:49 [PATCH v3 0/2] codingstyle: avoid unused parameters for a " Barry Song
2024-03-22 8:49 ` [PATCH v3 2/2] scripts: checkpatch: Check unused parameters for " Barry Song
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='CAFGhKbz70E3vihRkG4Hi20Tw8i7mGp=Z6j+NnELDTJd9cj9+Aw@mail.gmail.com' \
--to=charlemagnelasse@gmail.com \
--cc=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=corbet@lwn.net \
--cc=dwaipayanray1@gmail.com \
--cc=joe@perches.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=ma.xxn@outlook.com \
--cc=workflows@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 read-only IMAP folder(s) and NNTP newsgroup(s).