From mboxrd@z Thu Jan 1 00:00:00 1970 From: viresh.kumar@st.com (Viresh Kumar) Date: Tue, 17 Jan 2012 15:49:41 +0530 Subject: [PATCH 8/8] dmaengine/dw_dmac: Add support for DMA_SLAVE_CONFIG In-Reply-To: <4F153C33.5060805@st.com> References: <7c1e6fd573d5cd348b22f8363c9960fe5efcd658.1326707233.git.viresh.kumar@st.com> <4F140D25.1000309@st.com> <4F153C33.5060805@st.com> Message-ID: <4F154B3D.7050705@st.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 1/17/2012 2:45 PM, Viresh Kumar wrote: > On 1/17/2012 2:19 PM, Linus Walleij wrote: >> > Are you looking for ffs() from ? >> > >> > find-first-set (the include boils down to include/asm-generic/bitops/ffs.h >> > if you want to check the implementation). > Thanks, but it might not solve the issue. :( > Actually this will retain the first Least Significant Bit (which is 1) > and will mark all other zero. So it will give output 0b10 for 0b110 > Oops!! I didn't looked at fls in the implementation. :( You are right. This will solve my issue. -- viresh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752904Ab2AQKUO (ORCPT ); Tue, 17 Jan 2012 05:20:14 -0500 Received: from eu1sys200aog104.obsmtp.com ([207.126.144.117]:51901 "EHLO eu1sys200aog104.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752413Ab2AQKUM (ORCPT ); Tue, 17 Jan 2012 05:20:12 -0500 Message-ID: <4F154B3D.7050705@st.com> Date: Tue, 17 Jan 2012 15:49:41 +0530 From: Viresh Kumar User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: Linus Walleij Cc: "vinod.koul@intel.com" , "dan.j.williams@intel.com" , "linux@arm.linux.org.uk" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Armando VISCONTI , Shiraz HASHIM , Vipin KUMAR , Rajeev KUMAR , Deepak SIKRI , Vipul Kumar SAMAR , Amit VIRDI , Pratyush ANAND , Bhupesh SHARMA , "viresh.linux@gmail.com" , Bhavna YADAV , Vincenzo FRASCINO , Mirko GARDI Subject: Re: [PATCH 8/8] dmaengine/dw_dmac: Add support for DMA_SLAVE_CONFIG References: <7c1e6fd573d5cd348b22f8363c9960fe5efcd658.1326707233.git.viresh.kumar@st.com> <4F140D25.1000309@st.com> <4F153C33.5060805@st.com> In-Reply-To: <4F153C33.5060805@st.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/17/2012 2:45 PM, Viresh Kumar wrote: > On 1/17/2012 2:19 PM, Linus Walleij wrote: >> > Are you looking for ffs() from ? >> > >> > find-first-set (the include boils down to include/asm-generic/bitops/ffs.h >> > if you want to check the implementation). > Thanks, but it might not solve the issue. :( > Actually this will retain the first Least Significant Bit (which is 1) > and will mark all other zero. So it will give output 0b10 for 0b110 > Oops!! I didn't looked at fls in the implementation. :( You are right. This will solve my issue. -- viresh