lkml.org 
[lkml]   [2011]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subject[RFC] Convert "resource->end - resource->start + 1" to resource_size(resource) via coccinelle
From
Date
On Mon, 2011-06-06 at 13:49 -0700, H Hartley Sweeten wrote:
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Dan Williams <dan.j.williams@intel.com> (supporter:ASYNCHRONOUS TRAN...)
> Cc: Vinod Koul <vinod.koul@intel.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/




\
 
 \ /
  Last update: 2011-06-06 23:55    [W:0.068 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site