From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753545Ab2DCIq5 (ORCPT ); Tue, 3 Apr 2012 04:46:57 -0400 Received: from mail-pz0-f52.google.com ([209.85.210.52]:61066 "EHLO mail-pz0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751394Ab2DCIqz (ORCPT ); Tue, 3 Apr 2012 04:46:55 -0400 From: Akinobu Mita To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org Cc: Akinobu Mita , Sekhar Nori , Kevin Hilman , davinci-linux-open-source@linux.davincidsp.com, Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/4] arm: davinci: use for_each_set_bit_from Date: Tue, 3 Apr 2012 17:47:15 +0900 Message-Id: <1333442836-9947-3-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1333442836-9947-1-git-send-email-akinobu.mita@gmail.com> References: <1333442836-9947-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use for_each_set_bit_from to iterate over all the set bit in a memory region. Signed-off-by: Akinobu Mita Cc: Sekhar Nori Cc: Kevin Hilman Cc: davinci-linux-open-source@linux.davincidsp.com Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org --- arch/arm/mach-davinci/dma.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c index fd33919..2a41339 100644 --- a/arch/arm/mach-davinci/dma.c +++ b/arch/arm/mach-davinci/dma.c @@ -557,9 +557,9 @@ static int reserve_contiguous_slots(int ctlr, unsigned int id, if (i == edma_cc[ctlr]->num_slots) stop_slot = i; - for (j = start_slot; j < stop_slot; j++) - if (test_bit(j, tmp_inuse)) - clear_bit(j, edma_cc[ctlr]->edma_inuse); + j = start_slot; + for_each_set_bit_from(j, tmp_inuse, stop_slot); + clear_bit(j, edma_cc[ctlr]->edma_inuse); if (count) return -EBUSY; -- 1.7.4.4