* [PATCH] spi: fix SPI_BPW_RANGE_MASK() regression
@ 2019-03-13 21:00 Arnd Bergmann
2019-03-13 21:59 ` Geert Uytterhoeven
2019-03-14 15:54 ` Applied "spi: fix SPI_BPW_RANGE_MASK() regression" to the spi tree Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2019-03-13 21:00 UTC (permalink / raw)
To: Mark Brown; +Cc: Arnd Bergmann, Geert Uytterhoeven, linux-spi, linux-kernel
Geert points out that I confused the min/max arguments that are
reversed between SPI_BPW_RANGE_MASK() and GENMASK(). This time
I have verified the result of the macro after fixing the arguments.
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: eefffb42f665 ("spi: work around clang bug in SPI_BPW_RANGE_MASK()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
The broken commit is currently in the for-5.2 branch of the spi
tree. If this is a branch that gets rebased, please just fold this
fix into the original patch
---
include/linux/spi/spi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index b27386450089..a0975cf76cf6 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -444,7 +444,7 @@ struct spi_controller {
/* bitmask of supported bits_per_word for transfers */
u32 bits_per_word_mask;
#define SPI_BPW_MASK(bits) BIT((bits) - 1)
-#define SPI_BPW_RANGE_MASK(min, max) GENMASK((min) - 1, (max) - 1)
+#define SPI_BPW_RANGE_MASK(min, max) GENMASK((max) - 1, (min) - 1)
/* limits on transfer speed */
u32 min_speed_hz;
--
2.20.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: fix SPI_BPW_RANGE_MASK() regression
2019-03-13 21:00 [PATCH] spi: fix SPI_BPW_RANGE_MASK() regression Arnd Bergmann
@ 2019-03-13 21:59 ` Geert Uytterhoeven
2019-03-14 15:54 ` Applied "spi: fix SPI_BPW_RANGE_MASK() regression" to the spi tree Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2019-03-13 21:59 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Mark Brown, linux-spi, Linux Kernel Mailing List
On Wed, Mar 13, 2019 at 10:01 PM Arnd Bergmann <arnd@arndb.de> wrote:
> Geert points out that I confused the min/max arguments that are
> reversed between SPI_BPW_RANGE_MASK() and GENMASK(). This time
> I have verified the result of the macro after fixing the arguments.
>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Fixes: eefffb42f665 ("spi: work around clang bug in SPI_BPW_RANGE_MASK()")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Applied "spi: fix SPI_BPW_RANGE_MASK() regression" to the spi tree
2019-03-13 21:00 [PATCH] spi: fix SPI_BPW_RANGE_MASK() regression Arnd Bergmann
2019-03-13 21:59 ` Geert Uytterhoeven
@ 2019-03-14 15:54 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2019-03-14 15:54 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Geert Uytterhoeven, Mark Brown, Mark Brown, Geert Uytterhoeven,
linux-spi, linux-kernel, linux-spi
The patch
spi: fix SPI_BPW_RANGE_MASK() regression
has been applied to the spi tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 6d85028134d3f4f946924e2f9f0aaff47d9de840 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 13 Mar 2019 22:00:34 +0100
Subject: [PATCH] spi: fix SPI_BPW_RANGE_MASK() regression
Geert points out that I confused the min/max arguments that are
reversed between SPI_BPW_RANGE_MASK() and GENMASK(). This time
I have verified the result of the macro after fixing the arguments.
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: eefffb42f665 ("spi: work around clang bug in SPI_BPW_RANGE_MASK()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
include/linux/spi/spi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index b27386450089..a0975cf76cf6 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -444,7 +444,7 @@ struct spi_controller {
/* bitmask of supported bits_per_word for transfers */
u32 bits_per_word_mask;
#define SPI_BPW_MASK(bits) BIT((bits) - 1)
-#define SPI_BPW_RANGE_MASK(min, max) GENMASK((min) - 1, (max) - 1)
+#define SPI_BPW_RANGE_MASK(min, max) GENMASK((max) - 1, (min) - 1)
/* limits on transfer speed */
u32 min_speed_hz;
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-14 15:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-13 21:00 [PATCH] spi: fix SPI_BPW_RANGE_MASK() regression Arnd Bergmann
2019-03-13 21:59 ` Geert Uytterhoeven
2019-03-14 15:54 ` Applied "spi: fix SPI_BPW_RANGE_MASK() regression" to the spi tree Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).