Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754432Ab1FGFHm (ORCPT ); Tue, 7 Jun 2011 01:07:42 -0400 Received: from mgw2.diku.dk ([130.225.96.92]:34913 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752242Ab1FGFHl (ORCPT ); Tue, 7 Jun 2011 01:07:41 -0400 Date: Tue, 7 Jun 2011 07:07:35 +0200 (CEST) From: Julia Lawall To: Joe Perches Cc: H Hartley Sweeten , cocci , vinod.koul@intel.com, dan.j.williams@intel.com, Linux Kernel Subject: Re: [Cocci] [RFC] Convert "resource->end - resource->start + 1" to resource_size(resource) via coccinelle In-Reply-To: <1307397174.4994.26.camel@Joe-Laptop> Message-ID: References: <201106061349.00474.hartleys@visionengravers.com> <1307397174.4994.26.camel@Joe-Laptop> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 950 Lines: 30 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 > > Cc: Dan Williams (supporter:ASYNCHRONOUS TRAN...) > > Cc: Vinod Koul (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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/