From mboxrd@z Thu Jan 1 00:00:00 1970 From: viresh kumar Subject: Re: [PATCH V2 3/6] spi/spi-pl022: Don't allocate more sg than required. Date: Wed, 10 Aug 2011 14:35:54 +0530 Message-ID: <4E4249F2.1020406@st.com> References: <94a975df64a78bb533c85774a5bbd052c73fa5ba.1312965741.git.viresh.kumar@st.com> <20110810085431.GD1831@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Pratyush ANAND , Rajeev KUMAR , Bhavna YADAV , Bhupesh SHARMA , Armando VISCONTI , "linus.walleij@linaro.org" , "jassisinghbrar@gmail.com" , Vipin KUMAR , "grant.likely@secretlab.ca" , Shiraz HASHIM , Amit VIRDI , Vipul Kumar SAMAR , "viresh.linux@gmail.com" , Deepak SIKRI , "spi-devel-general@lists.sourceforge.net" , "linux-arm-kernel@lists.infradead.org" To: Russell King - ARM Linux Return-path: In-Reply-To: <20110810085431.GD1831@n2100.arm.linux.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org List-Id: linux-spi.vger.kernel.org On 08/10/2011 02:24 PM, Russell King - ARM Linux wrote: > It would be far better for this to be: > > pages = DIV_ROUND_UP(pl022->cur_transfer->len, PAGE_SIZE); > > The compiler will probably optimize it to the same code anyway. I thought of it too, but missed to update code. Thanks. -- viresh From mboxrd@z Thu Jan 1 00:00:00 1970 From: viresh.kumar@st.com (viresh kumar) Date: Wed, 10 Aug 2011 14:35:54 +0530 Subject: [PATCH V2 3/6] spi/spi-pl022: Don't allocate more sg than required. In-Reply-To: <20110810085431.GD1831@n2100.arm.linux.org.uk> References: <94a975df64a78bb533c85774a5bbd052c73fa5ba.1312965741.git.viresh.kumar@st.com> <20110810085431.GD1831@n2100.arm.linux.org.uk> Message-ID: <4E4249F2.1020406@st.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 08/10/2011 02:24 PM, Russell King - ARM Linux wrote: > It would be far better for this to be: > > pages = DIV_ROUND_UP(pl022->cur_transfer->len, PAGE_SIZE); > > The compiler will probably optimize it to the same code anyway. I thought of it too, but missed to update code. Thanks. -- viresh