From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1036568AbdDUIHB (ORCPT ); Fri, 21 Apr 2017 04:07:01 -0400 Received: from smtp2-g21.free.fr ([212.27.42.2]:3334 "EHLO smtp2-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1036546AbdDUIGy (ORCPT ); Fri, 21 Apr 2017 04:06:54 -0400 Subject: [PATCH] dmaengine: sun4i: fix invalid argument From: Mason To: Stephen Rothwell , Russell King , Vinod Koul , Dan Williams Cc: linux-next , LKML , Linux ARM , arm-soc , Emilio Lopez , dmaengine@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai References: <20170421084033.5c987e13@canb.auug.org.au> <9858a4ed-bdd9-bd6c-d8a4-e9e6bd539904@free.fr> Message-ID: <584a2c53-100b-945b-d665-cef3fa856526@free.fr> Date: Fri, 21 Apr 2017 10:06:10 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49 MIME-Version: 1.0 In-Reply-To: <9858a4ed-bdd9-bd6c-d8a4-e9e6bd539904@free.fr> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The "pchans_used" field is an unsigned long array. for_each_clear_bit_from() expects an unsigned long pointer, not an array address. $ make C=2 drivers/dma/sun4i-dma.o CHECK drivers/dma/sun4i-dma.c drivers/dma/sun4i-dma.c:241:9: warning: incorrect type in argument 1 (different base types) drivers/dma/sun4i-dma.c:241:9: expected unsigned long const *p drivers/dma/sun4i-dma.c:241:9: got unsigned long ( * )[1] Signed-off-by: Mason --- drivers/dma/sun4i-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/sun4i-dma.c b/drivers/dma/sun4i-dma.c index 57aa227bfadb..f4ed3f17607c 100644 --- a/drivers/dma/sun4i-dma.c +++ b/drivers/dma/sun4i-dma.c @@ -238,7 +238,7 @@ static struct sun4i_dma_pchan *find_and_use_pchan(struct sun4i_dma_dev *priv, } spin_lock_irqsave(&priv->lock, flags); - for_each_clear_bit_from(i, &priv->pchans_used, max) { + for_each_clear_bit_from(i, priv->pchans_used, max) { pchan = &pchans[i]; pchan->vchan = vchan; set_bit(i, priv->pchans_used); -- 3.14159