Linux-Doc Archive on lore.kernel.org
 help / color / Atom feed
From: peterz@infradead.org
To: Matthew Wilcox <willy@infradead.org>
Cc: mingo@kernel.org, will@kernel.org, a.darwish@linutronix.de,
	tglx@linutronix.de, paulmck@kernel.org, bigeasy@linutronix.de,
	rostedt@goodmis.org, linux-kernel@vger.kernel.org,
	corbet@lwn.net, davem@davemloft.net, netdev@vger.kernel.org,
	linux-doc@vger.kernel.org, viro@zeniv.linux.org.uk,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/5] seqlock: Fold seqcount_LOCKNAME_t definition
Date: Wed, 29 Jul 2020 18:19:38 +0200
Message-ID: <20200729161938.GB2678@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20200729153341.GE2638@hirez.programming.kicks-ass.net>

On Wed, Jul 29, 2020 at 05:33:41PM +0200, peterz@infradead.org wrote:
> On Wed, Jul 29, 2020 at 03:55:07PM +0100, Matthew Wilcox wrote:
> > On Wed, Jul 29, 2020 at 03:52:51PM +0200, Peter Zijlstra wrote:
> > > Manual repetition is boring and error prone.
> > 
> > Yes, but generated functions are hard to grep for, and I'm pretty sure
> > that kernel-doc doesn't know how to expand macros into comments that it
> > can then extract documentation from.
> > 
> > I've been thinking about how to cure this (mostly in the context
> > of page-flags.h).  I don't particularly like the C preprocessor, but
> > m4 is worse and defining our own preprocessing language seems like a
> > terrible idea.
> > 
> > So I was thinking about moving the current contents of page-flags.h
> > to include/src/page-flags.h, making linux/page-flags.h depend on
> > src/page-flags.h and run '$(CPP) -C' to generate it.  I've been a little
> > busy recently and haven't had time to do more than muse about this, but
> > I think it might make sense for some of our more heavily macro-templated
> > header files.
> 
> Use ctags and add to scripts/tags.sh.

I'll make the below into a proper patch.

---

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 4e18ae5282a6..63b21881a873 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -211,6 +211,8 @@ regex_c=(
 	'/\<DEVICE_ATTR_\(RW\|RO\|WO\)(\([[:alnum:]_]\+\)/dev_attr_\2/'
 	'/\<DRIVER_ATTR_\(RW\|RO\|WO\)(\([[:alnum:]_]\+\)/driver_attr_\2/'
 	'/\<\(DEFINE\|DECLARE\)_STATIC_KEY_\(TRUE\|FALSE\)\(\|_RO\)(\([[:alnum:]_]\+\)/\4/'
+	'/^SEQCOUNT_LOCKTYPE(\([^,]*\),[[:space:]]*\([^,]*\),[^)]*)/seqcount_\2_t/'
+	'/^SEQCOUNT_LOCKTYPE(\([^,]*\),[[:space:]]*\([^,]*\),[^)]*)/seqcount_\2_init/'
 )
 regex_kconfig=(
 	'/^[[:blank:]]*\(menu\|\)config[[:blank:]]\+\([[:alnum:]_]\+\)/\2/'

  reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 13:52 [PATCH 0/5] seqlock: Cleanups Peter Zijlstra
2020-07-29 13:52 ` [PATCH 1/5] seqlock: s/__SEQ_LOCKDEP/__SEQ_LOCK/g Peter Zijlstra
2020-07-29 14:29   ` Ahmed S. Darwish
2020-07-29 13:52 ` [PATCH 2/5] seqlock: Fold seqcount_LOCKNAME_t definition Peter Zijlstra
2020-07-29 14:38   ` Ahmed S. Darwish
2020-07-29 14:55   ` Matthew Wilcox
2020-07-29 15:33     ` peterz
2020-07-29 16:19       ` peterz [this message]
2020-07-29 13:52 ` [PATCH 3/5] seqlock: Fold seqcount_LOCKNAME_init() definition Peter Zijlstra
2020-07-29 13:52 ` [PATCH 4/5] seqcount: Compress SEQCNT_LOCKNAME_ZERO() Peter Zijlstra
2020-07-29 13:52 ` [PATCH 5/5] seqcount: More consistent seqprop names Peter Zijlstra
2020-07-29 14:39   ` Ahmed S. Darwish

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=20200729161938.GB2678@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=a.darwish@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=will@kernel.org \
    --cc=willy@infradead.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

Linux-Doc Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-doc/0 linux-doc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-doc linux-doc/ https://lore.kernel.org/linux-doc \
		linux-doc@vger.kernel.org
	public-inbox-index linux-doc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-doc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git