[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.1106070706000.18329@ask.diku.dk>
Date: Tue, 7 Jun 2011 07:07:35 +0200 (CEST)
From: Julia Lawall <julia@...u.dk>
To: Joe Perches <joe@...ches.com>
Cc: H Hartley Sweeten <hartleys@...ionengravers.com>,
cocci <cocci@...u.dk>, vinod.koul@...el.com,
dan.j.williams@...el.com,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [Cocci] [RFC] Convert "resource->end - resource->start + 1" to
resource_size(resource) via coccinelle
On Mon, 6 Jun 2011, Joe Perches wrote:
> On Mon, 2011-06-06 at 13:49 -0700, H Hartley Sweeten wrote:
> > Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
> > Cc: Dan Williams <dan.j.williams@...el.com> (supporter:ASYNCHRONOUS TRAN...)
> > Cc: Vinod Koul <vinod.koul@...el.com> (supporter:DMA GENERIC OFFLO...)
>
> Perhaps do a treewide update via:
>
> $ cat resource.cocci
> @@
> struct resource *ptr;
> @@
>
> - ptr->end - ptr->start + 1
> + resource_size(ptr)
>
> $ spatch -sp_file resource.cocci linux-2.6/
There might be some cases that have the +1 in a different place, or that
have some parentheses.
I suspect that a lot of these non-uses of resource_size still exist.
julia
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists