Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758497AbYBRTgk (ORCPT ); Mon, 18 Feb 2008 14:36:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752739AbYBRTgb (ORCPT ); Mon, 18 Feb 2008 14:36:31 -0500 Received: from rgminet01.oracle.com ([148.87.113.118]:34150 "EHLO rgminet01.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752808AbYBRTga (ORCPT ); Mon, 18 Feb 2008 14:36:30 -0500 Date: Mon, 18 Feb 2008 11:36:11 -0800 From: Mark Fasheh To: Julia Lawall Cc: kurt.hackel@oracle.com, ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH 3/6] fs/ocfs2: Use DIV_ROUND_UP Message-ID: <20080218193611.GY22671@ca-server1.us.oracle.com> Reply-To: Mark Fasheh References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Oracle Corporation User-Agent: Mutt/1.5.16 (2007-06-11) X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1189 Lines: 55 On Thu, Feb 14, 2008 at 04:15:17PM +0100, Julia Lawall wrote: > From: Julia Lawall > > The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) / > (d)) but is perhaps more readable. > > An extract of the semantic patch that makes this change is as follows: > (http://www.emn.fr/x-info/coccinelle/) > > // > @haskernel@ > @@ > > #include > > @depends on haskernel@ > expression n,d; > @@ > > ( > - (n + d - 1) / d > + DIV_ROUND_UP(n,d) > | > - (n + (d - 1)) / d > + DIV_ROUND_UP(n,d) > ) > > @depends on haskernel@ > expression n,d; > @@ > > - DIV_ROUND_UP((n),d) > + DIV_ROUND_UP(n,d) > > @depends on haskernel@ > expression n,d; > @@ > > - DIV_ROUND_UP(n,(d)) > + DIV_ROUND_UP(n,d) > // > > Signed-off-by: Julia Lawall Acked-by: Mark Fasheh --Mark -- Mark Fasheh Principal Software Developer, Oracle mark.fasheh@oracle.com -- 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/