All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Heiser <markus.heiser@darmarit.de>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	Jani Nikula <jani.nikula@intel.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH 2/3] doc-rst:c-domain: function-like macros arguments
Date: Wed, 7 Sep 2016 07:26:27 +0200	[thread overview]
Message-ID: <DD0DE746-C3A0-4863-A199-B9A7944F4CE4@darmarit.de> (raw)
In-Reply-To: <20160906062723.5125b89b@lwn.net>


Am 06.09.2016 um 14:27 schrieb Jonathan Corbet <corbet@lwn.net>:

> So I'm going into total nit-picking territory here, but since I'm looking
> at it and I think the series needs a respin anyway...
> 
> On Wed, 31 Aug 2016 17:29:31 +0200
> Markus Heiser <markus.heiser@darmarit.de> wrote:
> 
>> +        m = c_funcptr_sig_re.match(sig)
>> +        if m is None:
>> +            m = c_sig_re.match(sig)
>> +        if m is None:
>> +            raise ValueError('no match')
> 
> How about we put that second test inside the first if block and avoid the
> redundant None test if the first match works?  The energy saved may
> prevent a hurricane someday :)

And prohibit the MS-Windows update installer will save the climate ;)
It is a habit of mine to avoid indentations, but you are right,
it is not appropriate here.

>> +
>> +        rettype, fullname, arglist, _const = m.groups()
>> +        if rettype or not arglist.strip():
>> +            return False
>> +
>> +        arglist = arglist.replace('`', '').replace('\\ ', '').strip()  # remove markup
>> +        arglist = [a.strip() for a in arglist.split(",")]
> 
> Similarly, stripping the args three times seems a bit much.  The middle
> one is totally redundant and could go at a minimum.

Thanks for pointing this. You are right, I will fix it.

-- Markus --

> 
> Thanks,
> 
> jon


  reply	other threads:[~2016-09-07  5:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31 15:29 [RFC PATCH 0/3] doc-rst:c-domain: fix some issues in the c-domain Markus Heiser
2016-08-31 15:29 ` [PATCH 1/3] doc-rst:c-domain: fix sphinx version incompatibility Markus Heiser
2016-09-06 12:19   ` Jonathan Corbet
2016-09-06 12:24     ` Markus Heiser
2016-09-06 12:30       ` Jonathan Corbet
2016-09-06 13:34     ` Jani Nikula
2016-09-06 15:10       ` Markus Heiser
2016-09-06 15:55         ` Mauro Carvalho Chehab
2016-09-07  8:01           ` Markus Heiser
2016-08-31 15:29 ` [PATCH 2/3] doc-rst:c-domain: function-like macros arguments Markus Heiser
2016-09-06 12:27   ` Jonathan Corbet
2016-09-07  5:26     ` Markus Heiser [this message]
2016-08-31 15:29 ` [PATCH 3/3] doc-rst:c-domain: function-like macros index entry Markus Heiser
2016-09-06 12:28   ` 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=DD0DE746-C3A0-4863-A199-B9A7944F4CE4@darmarit.de \
    --to=markus.heiser@darmarit.de \
    --cc=corbet@lwn.net \
    --cc=jani.nikula@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.