Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57192245 authored by Marc Gonzalez's avatar Marc Gonzalez Committed by Vinod Koul
Browse files

dmaengine: sun4i: fix invalid argument



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 ( *<noident> )[1]

Signed-off-by: default avatarMarc Gonzalez <marc_gonzalez@sigmadesigns.com>
Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 68747c5f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -238,7 +238,7 @@ static struct sun4i_dma_pchan *find_and_use_pchan(struct sun4i_dma_dev *priv,
	}
	}


	spin_lock_irqsave(&priv->lock, flags);
	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 = &pchans[i];
		pchan->vchan = vchan;
		pchan->vchan = vchan;
		set_bit(i, priv->pchans_used);
		set_bit(i, priv->pchans_used);