diff mbox series

[for-4.20] spi: bcm2835: Unbreak the build of esoteric configs

Message ID 4a53a5c59b9e454476a2313735d6353428e982cb.1543500560.git.lukas@wunner.de (mailing list archive)
State Accepted
Commit 29bdedfd9cf40e59456110ca417a8cb672ac9b92
Headers show
Series [for-4.20] spi: bcm2835: Unbreak the build of esoteric configs | expand

Commit Message

Lukas Wunner Nov. 29, 2018, 2:14 p.m. UTC
Commit e82b0b382845 ("spi: bcm2835: Fix race on DMA termination") broke
the build with COMPILE_TEST=y on arches whose cmpxchg() requires 32-bit
operands (xtensa, older arm ISAs).

Unfortunately the commit was applied despite prior warning that it needs
to be respun:
https://marc.info/?l=linux-spi&m=154186019626675&w=2

Fix by changing the dma_pending flag's type from bool to unsigned int.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Fixes: e82b0b382845 ("spi: bcm2835: Fix race on DMA termination")
Cc: Frank Pavlic <f.pavlic@kunbus.de>
Cc: Martin Sperl <kernel@martin.sperl.org>
Cc: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/spi/spi-bcm2835.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown Nov. 29, 2018, 3:31 p.m. UTC | #1
On Thu, Nov 29, 2018 at 03:14:49PM +0100, Lukas Wunner wrote:

> Unfortunately the commit was applied despite prior warning that it needs
> to be respun:
> https://marc.info/?l=linux-spi&m=154186019626675&w=2

Sorry about that, I started scanning the changelog when it hit
discussion about doing a more involved fix for -next - it's good to draw
attention to reasons not to merge the patch a bit more prominently as it
helps avoid things like that.
Lukas Wunner Nov. 29, 2018, 9:14 p.m. UTC | #2
On Thu, Nov 29, 2018 at 03:31:05PM +0000, Mark Brown wrote:
> On Thu, Nov 29, 2018 at 03:14:49PM +0100, Lukas Wunner wrote:
> > Unfortunately the commit was applied despite prior warning that it needs
> > to be respun:
> > https://marc.info/?l=linux-spi&m=154186019626675&w=2
> 
> Sorry about that, I started scanning the changelog when it hit
> discussion about doing a more involved fix for -next - it's good to draw
> attention to reasons not to merge the patch a bit more prominently as it
> helps avoid things like that.

NHNF.  Feel free to squash the patch into the commit it fixes if you like.
Same for the "Polish transfer of DMA prologue" patch.

(A note regarding the latter patch, I've realized that it won't apply
cleanly to your for-4.21 branch because I based it on a branch which
had the "Unbreak the build" patch already applied.  It will apply
cleanly if you change the type of the dma_pending flag back to bool
in the 2nd hunk.  Sorry for the confusion.  Shout if you'd prefer me
to resend.)

Thanks,

Lukas
diff mbox series

Patch

diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c
index 774161b..25abf2d 100644
--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -88,7 +88,7 @@  struct bcm2835_spi {
 	u8 *rx_buf;
 	int tx_len;
 	int rx_len;
-	bool dma_pending;
+	unsigned int dma_pending;
 };
 
 static inline u32 bcm2835_rd(struct bcm2835_spi *bs, unsigned reg)