From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751860AbcF3Gfz (ORCPT ); Thu, 30 Jun 2016 02:35:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:52546 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750969AbcF3Gfy (ORCPT ); Thu, 30 Jun 2016 02:35:54 -0400 Date: Thu, 30 Jun 2016 08:35:52 +0200 Message-ID: From: Takashi Iwai To: "Amitoj Kaur Chawla" Cc: , , , Subject: Re: [PATCH] ALSA: riptide: Use DIV_ROUND_UP In-Reply-To: <20160629145628.GA13915@amitoj-Inspiron-3542> References: <20160629145628.GA13915@amitoj-Inspiron-3542> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.5 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Jun 2016 16:56:28 +0200, Amitoj Kaur Chawla wrote: > > The kernel.h macro DIV_ROUND_UP performs the computation > (((n) + (d) - 1) /(d)) but is perhaps more readable. > > The Coccinelle script used to make this change is as follows: > @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) > ) > > Signed-off-by: Amitoj Kaur Chawla Applied, thanks. Takashi From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] ALSA: riptide: Use DIV_ROUND_UP Date: Thu, 30 Jun 2016 08:35:52 +0200 Message-ID: References: <20160629145628.GA13915@amitoj-Inspiron-3542> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20160629145628.GA13915@amitoj-Inspiron-3542> Sender: linux-kernel-owner@vger.kernel.org To: Amitoj Kaur Chawla Cc: alsa-devel@alsa-project.org, perex@perex.cz, linux-kernel@vger.kernel.org, julia.lawall@lip6.fr List-Id: alsa-devel@alsa-project.org On Wed, 29 Jun 2016 16:56:28 +0200, Amitoj Kaur Chawla wrote: > > The kernel.h macro DIV_ROUND_UP performs the computation > (((n) + (d) - 1) /(d)) but is perhaps more readable. > > The Coccinelle script used to make this change is as follows: > @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) > ) > > Signed-off-by: Amitoj Kaur Chawla Applied, thanks. Takashi