From: Joe Perches <joe@perches.com>
To: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Kumar Gaurav <kumargauravgupta3@gmail.com>,
David Miller <davem@davemloft.net>,
Dan Carpenter <dan.carpenter@oracle.com>,
emilio@elopez.com.ar, mugunthanvnm@ti.com, jg1.han@samsung.com,
hsweeten@visionengravers.com, netdev <netdev@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] net:ethernet:korina.c Removed IRQF_DISABLED
Date: Fri, 09 Aug 2013 15:14:27 +0000 [thread overview]
Message-ID: <1376061267.2087.91.camel@joe-AO722> (raw)
In-Reply-To: <CA+MoWDrsHf4NFE_iszymh6SaBfXsMybC194ZQaKgURmCFwiJRQ@mail.gmail.com>
On Fri, 2013-08-09 at 15:15 +0200, Peter Senna Tschudin wrote:
> Coccinelle (http://coccinelle.lip6.fr/) can help you in this task. The
> semantic patch below takes care of both cases for you:
Hi Peter & Kumar
Coccinelle (aka: spatch) is a good/great way to do this.
(btw Peter, your email was whitespace damaged)
Peter's useful conversion won't find/convert cases where
IRQF_DISABLED is used in a #define like:
> diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
> []
> @@ -915,7 +915,7 @@ static int ks_net_open(struct net_device *netdev)
> []
> -#define KS_INT_FLAGS (IRQF_DISABLED|IRQF_TRIGGER_LOW)
> +#define KS_INT_FLAGS (IRQF_TRIGGER_LOW)
You'd still have to do those by hand.
Also, it's good to just do the direct conversions/renames
so that it's easy to verify just a single attribute has
been changed by the patches.
There are tools like Dan Carpenter's rename_review.pl
https://lkml.org/lkml/2011/7/19/196
that can help you verify the patches.
These patches will generate different objects than the
original codes. Otherwise, it's good to make sure that for
whitespace only/style patches, the objects are unchanged.
Make the patch that removes the IRQF_DISABLED #define
last in the series and maybe do not even submit it until a
few weeks after all the other patches are accepted.
Lastly, it might also be good to reflow the modified code
to maximally fill to 80 columns where reasonable. This can
both make the code a bit more human readable and reduce the
overall line count.
Just remember it's generally better to do any code reflow
in a separate patch. To me the criteria for combining
is how large the rename patch is. Smallish, ok to reflow,
largish, not ok. Use your taste as appropriate.
next prev parent reply other threads:[~2013-08-09 15:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-08 19:32 [PATCH] net:ethernet:korina.c Removed IRQF_DISABLED Kumar Gaurav
2013-08-08 21:09 ` Dan Carpenter
2013-08-08 21:11 ` Sergei Shtylyov
2013-08-08 21:20 ` David Miller
2013-08-08 21:23 ` Dan Carpenter
2013-08-08 21:33 ` Joe Perches
2013-08-09 2:36 ` Kumar Gaurav
2013-08-09 2:39 ` Joe Perches
2013-08-09 2:57 ` Kumar Gaurav
2013-08-09 2:54 ` Joe Perches
2013-08-09 3:12 ` Kumar Gaurav
2013-08-09 3:10 ` Joe Perches
2013-08-09 3:28 ` Joe Perches
2013-08-09 3:50 ` Kumar Gaurav
2013-08-09 13:15 ` Peter Senna Tschudin
2013-08-09 15:14 ` Joe Perches [this message]
2013-08-09 15:53 ` Peter Senna Tschudin
2013-08-09 16:28 ` Joe Perches
2013-08-09 7:11 ` walter harms
2013-08-09 0:59 ` Jingoo Han
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=1376061267.2087.91.camel@joe-AO722 \
--to=joe@perches.com \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=emilio@elopez.com.ar \
--cc=hsweeten@visionengravers.com \
--cc=jg1.han@samsung.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kumargauravgupta3@gmail.com \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
--cc=peter.senna@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox