From: Jes Sorensen <jes.sorensen@gmail.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Cristina Opriceana <cristina.opriceana@gmail.com>,
outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH v2 1/2] Staging: rtl8192u: Do not add new typedefs
Date: Tue, 17 Mar 2015 12:50:03 -0400 [thread overview]
Message-ID: <55085B3B.1020703@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1503171746270.2527@hadrien>
On 03/17/15 12:47, Julia Lawall wrote:
>
>
> On Tue, 17 Mar 2015, Jes Sorensen wrote:
>
>> On 03/16/15 15:55, Cristina Opriceana wrote:
>>> This patch removes the dig_t and DRxPathSel type definitions in order to
>>> avoid the following warning: "WARNING: Do not add new typedefs".
>>> Done with coccinelle and this script:
>>>
>>> @r@ type t; identifier id; @@
>>> typedef struct id
>>> {...}
>>> t;
>>>
>>> @script:python get_name@
>>> t << r.t;
>>> tdres;
>>> @@
>>> coccinelle.tdres = t.replace("_t", "");
>>>
>>> @r_match@ type r.t; identifier r.id;
>>> identifier get_name.tdres; @@
>>> -typedef
>>> struct
>>> -id
>>> +tdres
>>> {...}
>>> -t
>>> ;
>>> @r_replace@ type r.t; identifier get_name.tdres; @@
>>> -t
>>> +struct tdres
>>>
>>> Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
>>
>> Removing pointless typedefs like these is clearly a win. However for
>> something like this, I don't think you need to include the coccinnelle
>> rules, simply stating that you are getting rid of unnecessary typedefs
>> is a win.
>
> Actually, I think the rule is nice, because we can see that she is taking
> care of the _t before looking at each case. I would tend to put a
> complete rule like this in a cover letter though, but it depends on how
> the patch series is organized.
There is definitely a level of personal preference here. IMHO the rule
doesn't add value to the commit log, since it doesn't deal with an
actual bug. Having it in a cover-letter would be fine.
Cheers,
Jes
next prev parent reply other threads:[~2015-03-17 16:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 19:52 [PATCH v2 0/2] Remove typedefs and rename struct Cristina Opriceana
2015-03-16 19:55 ` [PATCH v2 1/2] Staging: rtl8192u: Do not add new typedefs Cristina Opriceana
2015-03-17 15:23 ` [Outreachy kernel] " Jes Sorensen
2015-03-17 16:47 ` Julia Lawall
2015-03-17 16:50 ` Jes Sorensen [this message]
2015-03-16 19:56 ` [PATCH v2 2/2] Staging: rtl8192u: Rename struct to avoid CamelCase Cristina Opriceana
2015-03-17 15:26 ` [Outreachy kernel] " Jes Sorensen
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=55085B3B.1020703@gmail.com \
--to=jes.sorensen@gmail.com \
--cc=cristina.opriceana@gmail.com \
--cc=julia.lawall@lip6.fr \
--cc=outreachy-kernel@googlegroups.com \
/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.