* [PATCH 00/12] treewide: Fix GENMASK misuses
@ 2019-07-10 5:04 ` Joe Perches
2019-07-10 5:04 ` [PATCH 03/12] drm: aspeed_gfx: Fix misuse of GENMASK macro Joe Perches
` (8 more replies)
0 siblings, 9 replies; 30+ messages in thread
From: Joe Perches @ 2019-07-10 5:04 UTC (permalink / raw)
To: Andrew Morton, Patrick Venture, Nancy Yuen, Benjamin Fair,
Andrew Jeffery, openbmc, linux-kernel, linux-aspeed,
linux-arm-kernel, linux-amlogic, netdev, linux-mediatek,
linux-stm32, linux-wireless, linux-media
Cc: linux-iio, devel, alsa-devel, linux-mmc, dri-devel
These GENMASK uses are inverted argument order and the
actual masks produced are incorrect. Fix them.
Add checkpatch tests to help avoid more misuses too.
Joe Perches (12):
checkpatch: Add GENMASK tests
clocksource/drivers/npcm: Fix misuse of GENMASK macro
drm: aspeed_gfx: Fix misuse of GENMASK macro
iio: adc: max9611: Fix misuse of GENMASK macro
irqchip/gic-v3-its: Fix misuse of GENMASK macro
mmc: meson-mx-sdio: Fix misuse of GENMASK macro
net: ethernet: mediatek: Fix misuses of GENMASK macro
net: stmmac: Fix misuses of GENMASK macro
rtw88: Fix misuse of GENMASK macro
phy: amlogic: G12A: Fix misuse of GENMASK macro
staging: media: cedrus: Fix misuse of GENMASK macro
ASoC: wcd9335: Fix misuse of GENMASK macro
drivers/clocksource/timer-npcm7xx.c | 2 +-
drivers/gpu/drm/aspeed/aspeed_gfx.h | 2 +-
drivers/iio/adc/max9611.c | 2 +-
drivers/irqchip/irq-gic-v3-its.c | 2 +-
drivers/mmc/host/meson-mx-sdio.c | 2 +-
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +-
drivers/net/ethernet/mediatek/mtk_sgmii.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/descs.h | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 4 ++--
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 2 +-
drivers/phy/amlogic/phy-meson-g12a-usb2.c | 2 +-
drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 2 +-
scripts/checkpatch.pl | 15 +++++++++++++++
sound/soc/codecs/wcd-clsh-v2.c | 2 +-
14 files changed, 29 insertions(+), 14 deletions(-)
--
2.15.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 03/12] drm: aspeed_gfx: Fix misuse of GENMASK macro
2019-07-10 5:04 ` [PATCH 00/12] treewide: Fix GENMASK misuses Joe Perches
@ 2019-07-10 5:04 ` Joe Perches
2019-07-24 17:16 ` Joe Perches
2019-07-10 5:04 ` [PATCH 06/12] mmc: meson-mx-sdio: " Joe Perches
` (7 subsequent siblings)
8 siblings, 1 reply; 30+ messages in thread
From: Joe Perches @ 2019-07-10 5:04 UTC (permalink / raw)
To: Andrew Morton, Joel Stanley, Andrew Jeffery
Cc: linux-aspeed, David Airlie, linux-kernel, dri-devel,
Daniel Vetter, linux-arm-kernel
Arguments are supposed to be ordered high then low.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/gpu/drm/aspeed/aspeed_gfx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx.h b/drivers/gpu/drm/aspeed/aspeed_gfx.h
index a10358bb61ec..095ea03e5833 100644
--- a/drivers/gpu/drm/aspeed/aspeed_gfx.h
+++ b/drivers/gpu/drm/aspeed/aspeed_gfx.h
@@ -74,7 +74,7 @@ int aspeed_gfx_create_output(struct drm_device *drm);
/* CTRL2 */
#define CRT_CTRL_DAC_EN BIT(0)
#define CRT_CTRL_VBLANK_LINE(x) (((x) << 20) & CRT_CTRL_VBLANK_LINE_MASK)
-#define CRT_CTRL_VBLANK_LINE_MASK GENMASK(20, 31)
+#define CRT_CTRL_VBLANK_LINE_MASK GENMASK(31, 20)
/* CRT_HORIZ0 */
#define CRT_H_TOTAL(x) (x)
--
2.15.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 06/12] mmc: meson-mx-sdio: Fix misuse of GENMASK macro
2019-07-10 5:04 ` [PATCH 00/12] treewide: Fix GENMASK misuses Joe Perches
2019-07-10 5:04 ` [PATCH 03/12] drm: aspeed_gfx: Fix misuse of GENMASK macro Joe Perches
@ 2019-07-10 5:04 ` Joe Perches
2019-07-22 7:23 ` Neil Armstrong
2019-07-22 13:43 ` Ulf Hansson
2019-07-10 5:04 ` [PATCH 07/12] net: ethernet: mediatek: Fix misuses " Joe Perches
` (6 subsequent siblings)
8 siblings, 2 replies; 30+ messages in thread
From: Joe Perches @ 2019-07-10 5:04 UTC (permalink / raw)
To: Andrew Morton, Kevin Hilman
Cc: linux-amlogic, Ulf Hansson, linux-mmc, linux-kernel, linux-arm-kernel
Arguments are supposed to be ordered high then low.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/mmc/host/meson-mx-sdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c
index 2d736e416775..ba9a63db73da 100644
--- a/drivers/mmc/host/meson-mx-sdio.c
+++ b/drivers/mmc/host/meson-mx-sdio.c
@@ -73,7 +73,7 @@
#define MESON_MX_SDIO_IRQC_IF_CONFIG_MASK GENMASK(7, 6)
#define MESON_MX_SDIO_IRQC_FORCE_DATA_CLK BIT(8)
#define MESON_MX_SDIO_IRQC_FORCE_DATA_CMD BIT(9)
- #define MESON_MX_SDIO_IRQC_FORCE_DATA_DAT_MASK GENMASK(10, 13)
+ #define MESON_MX_SDIO_IRQC_FORCE_DATA_DAT_MASK GENMASK(13, 10)
#define MESON_MX_SDIO_IRQC_SOFT_RESET BIT(15)
#define MESON_MX_SDIO_IRQC_FORCE_HALT BIT(30)
#define MESON_MX_SDIO_IRQC_HALT_HOLE BIT(31)
--
2.15.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 07/12] net: ethernet: mediatek: Fix misuses of GENMASK macro
2019-07-10 5:04 ` [PATCH 00/12] treewide: Fix GENMASK misuses Joe Perches
2019-07-10 5:04 ` [PATCH 03/12] drm: aspeed_gfx: Fix misuse of GENMASK macro Joe Perches
2019-07-10 5:04 ` [PATCH 06/12] mmc: meson-mx-sdio: " Joe Perches
@ 2019-07-10 5:04 ` Joe Perches
2019-07-10 5:04 ` [PATCH 08/12] net: stmmac: " Joe Perches
` (5 subsequent siblings)
8 siblings, 0 replies; 30+ messages in thread
From: Joe Perches @ 2019-07-10 5:04 UTC (permalink / raw)
To: Andrew Morton, Felix Fietkau, John Crispin, Sean Wang,
Nelson Chang, Matthias Brugger
Cc: netdev, linux-mediatek, David S. Miller, linux-arm-kernel, linux-kernel
Arguments are supposed to be ordered high then low.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +-
drivers/net/ethernet/mediatek/mtk_sgmii.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
index 876ce6798709..221012ecb845 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -712,7 +712,7 @@ struct mtk_soc_data {
#define MTK_MAX_DEVS 2
#define MTK_SGMII_PHYSPEED_AN BIT(31)
-#define MTK_SGMII_PHYSPEED_MASK GENMASK(0, 2)
+#define MTK_SGMII_PHYSPEED_MASK GENMASK(2, 0)
#define MTK_SGMII_PHYSPEED_1000 BIT(0)
#define MTK_SGMII_PHYSPEED_2500 BIT(1)
#define MTK_HAS_FLAGS(flags, _x) (((flags) & (_x)) == (_x))
diff --git a/drivers/net/ethernet/mediatek/mtk_sgmii.c b/drivers/net/ethernet/mediatek/mtk_sgmii.c
index 136f90ce5a65..ff509d42d818 100644
--- a/drivers/net/ethernet/mediatek/mtk_sgmii.c
+++ b/drivers/net/ethernet/mediatek/mtk_sgmii.c
@@ -82,7 +82,7 @@ int mtk_sgmii_setup_mode_force(struct mtk_sgmii *ss, int id)
return -EINVAL;
regmap_read(ss->regmap[id], ss->ana_rgc3, &val);
- val &= ~GENMASK(2, 3);
+ val &= ~GENMASK(3, 2);
mode = ss->flags[id] & MTK_SGMII_PHYSPEED_MASK;
val |= (mode == MTK_SGMII_PHYSPEED_1000) ? 0 : BIT(2);
regmap_write(ss->regmap[id], ss->ana_rgc3, val);
--
2.15.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 08/12] net: stmmac: Fix misuses of GENMASK macro
2019-07-10 5:04 ` [PATCH 00/12] treewide: Fix GENMASK misuses Joe Perches
` (2 preceding siblings ...)
2019-07-10 5:04 ` [PATCH 07/12] net: ethernet: mediatek: Fix misuses " Joe Perches
@ 2019-07-10 5:04 ` Joe Perches
2019-07-10 10:33 ` Jose Abreu
2019-07-10 5:04 ` [PATCH 10/12] phy: amlogic: G12A: Fix misuse " Joe Perches
` (4 subsequent siblings)
8 siblings, 1 reply; 30+ messages in thread
From: Joe Perches @ 2019-07-10 5:04 UTC (permalink / raw)
To: Andrew Morton, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
Maxime Coquelin, Maxime Ripard, Chen-Yu Tsai
Cc: netdev, linux-kernel, David S. Miller, linux-arm-kernel, linux-stm32
Arguments are supposed to be ordered high then low.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/stmicro/stmmac/descs.h | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/descs.h b/drivers/net/ethernet/stmicro/stmmac/descs.h
index 10429b05f932..9f0b9a9e63b3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/descs.h
+++ b/drivers/net/ethernet/stmicro/stmmac/descs.h
@@ -123,7 +123,7 @@
#define ETDES1_BUFFER2_SIZE_SHIFT 16
/* Extended Receive descriptor definitions */
-#define ERDES4_IP_PAYLOAD_TYPE_MASK GENMASK(2, 6)
+#define ERDES4_IP_PAYLOAD_TYPE_MASK GENMASK(6, 2)
#define ERDES4_IP_HDR_ERR BIT(3)
#define ERDES4_IP_PAYLOAD_ERR BIT(4)
#define ERDES4_IP_CSUM_BYPASSED BIT(5)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 6d5cba4075eb..4c5db00c1d18 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -192,7 +192,7 @@ static const struct emac_variant emac_variant_h6 = {
/* Used in RX_CTL1*/
#define EMAC_RX_MD BIT(1)
-#define EMAC_RX_TH_MASK GENMASK(4, 5)
+#define EMAC_RX_TH_MASK GENMASK(5, 4)
#define EMAC_RX_TH_32 0
#define EMAC_RX_TH_64 (0x1 << 4)
#define EMAC_RX_TH_96 (0x2 << 4)
@@ -203,7 +203,7 @@ static const struct emac_variant emac_variant_h6 = {
/* Used in TX_CTL1*/
#define EMAC_TX_MD BIT(1)
#define EMAC_TX_NEXT_FRM BIT(2)
-#define EMAC_TX_TH_MASK GENMASK(8, 10)
+#define EMAC_TX_TH_MASK GENMASK(10, 8)
#define EMAC_TX_TH_64 0
#define EMAC_TX_TH_128 (0x1 << 8)
#define EMAC_TX_TH_192 (0x2 << 8)
--
2.15.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 10/12] phy: amlogic: G12A: Fix misuse of GENMASK macro
2019-07-10 5:04 ` [PATCH 00/12] treewide: Fix GENMASK misuses Joe Perches
` (3 preceding siblings ...)
2019-07-10 5:04 ` [PATCH 08/12] net: stmmac: " Joe Perches
@ 2019-07-10 5:04 ` Joe Perches
2019-07-22 7:23 ` Neil Armstrong
2019-07-10 5:04 ` [PATCH 11/12] staging: media: cedrus: " Joe Perches
` (3 subsequent siblings)
8 siblings, 1 reply; 30+ messages in thread
From: Joe Perches @ 2019-07-10 5:04 UTC (permalink / raw)
To: Andrew Morton, Kevin Hilman
Cc: linux-amlogic, linux-kernel, linux-arm-kernel, Kishon Vijay Abraham I
Arguments are supposed to be ordered high then low.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/phy/amlogic/phy-meson-g12a-usb2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb2.c b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
index 9065ffc85eb4..cd7eccab2649 100644
--- a/drivers/phy/amlogic/phy-meson-g12a-usb2.c
+++ b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
@@ -66,7 +66,7 @@
#define PHY_CTRL_R14 0x38
#define PHY_CTRL_R14_I_RDP_EN BIT(0)
#define PHY_CTRL_R14_I_RPU_SW1_EN BIT(1)
- #define PHY_CTRL_R14_I_RPU_SW2_EN GENMASK(2, 3)
+ #define PHY_CTRL_R14_I_RPU_SW2_EN GENMASK(3, 2)
#define PHY_CTRL_R14_PG_RSTN BIT(4)
#define PHY_CTRL_R14_I_C2L_DATA_16_8 BIT(5)
#define PHY_CTRL_R14_I_C2L_ASSERT_SINGLE_EN_ZERO BIT(6)
--
2.15.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 11/12] staging: media: cedrus: Fix misuse of GENMASK macro
2019-07-10 5:04 ` [PATCH 00/12] treewide: Fix GENMASK misuses Joe Perches
` (4 preceding siblings ...)
2019-07-10 5:04 ` [PATCH 10/12] phy: amlogic: G12A: Fix misuse " Joe Perches
@ 2019-07-10 5:04 ` Joe Perches
2019-07-10 7:23 ` Paul Kocialkowski
2019-07-24 17:09 ` Joe Perches
2019-07-10 9:17 ` [PATCH 00/12] treewide: Fix GENMASK misuses Johannes Berg
` (2 subsequent siblings)
8 siblings, 2 replies; 30+ messages in thread
From: Joe Perches @ 2019-07-10 5:04 UTC (permalink / raw)
To: Andrew Morton, Maxime Ripard, Paul Kocialkowski, Chen-Yu Tsai
Cc: devel, Greg Kroah-Hartman, linux-kernel, Mauro Carvalho Chehab,
linux-arm-kernel, linux-media
Arguments are supposed to be ordered high then low.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
index 3e9931416e45..ddd29788d685 100644
--- a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
+++ b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
@@ -110,7 +110,7 @@
#define VE_DEC_MPEG_MBADDR (VE_ENGINE_DEC_MPEG + 0x10)
#define VE_DEC_MPEG_MBADDR_X(w) (((w) << 8) & GENMASK(15, 8))
-#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(0, 7))
+#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(7, 0))
#define VE_DEC_MPEG_CTRL (VE_ENGINE_DEC_MPEG + 0x14)
--
2.15.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH 11/12] staging: media: cedrus: Fix misuse of GENMASK macro
2019-07-10 5:04 ` [PATCH 11/12] staging: media: cedrus: " Joe Perches
@ 2019-07-10 7:23 ` Paul Kocialkowski
2019-07-24 17:09 ` Joe Perches
1 sibling, 0 replies; 30+ messages in thread
From: Paul Kocialkowski @ 2019-07-10 7:23 UTC (permalink / raw)
To: Joe Perches
Cc: devel, Maxime Ripard, Greg Kroah-Hartman, linux-kernel,
Chen-Yu Tsai, Andrew Morton, Mauro Carvalho Chehab,
linux-arm-kernel, linux-media
Hi,
On Tue 09 Jul 19, 22:04, Joe Perches wrote:
> Arguments are supposed to be ordered high then low.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Good catch, thanks!
Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Cheers,
Paul
> ---
> drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> index 3e9931416e45..ddd29788d685 100644
> --- a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> +++ b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> @@ -110,7 +110,7 @@
> #define VE_DEC_MPEG_MBADDR (VE_ENGINE_DEC_MPEG + 0x10)
>
> #define VE_DEC_MPEG_MBADDR_X(w) (((w) << 8) & GENMASK(15, 8))
> -#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(0, 7))
> +#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(7, 0))
>
> #define VE_DEC_MPEG_CTRL (VE_ENGINE_DEC_MPEG + 0x14)
>
> --
> 2.15.0
>
--
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 00/12] treewide: Fix GENMASK misuses
2019-07-10 5:04 ` [PATCH 00/12] treewide: Fix GENMASK misuses Joe Perches
` (5 preceding siblings ...)
2019-07-10 5:04 ` [PATCH 11/12] staging: media: cedrus: " Joe Perches
@ 2019-07-10 9:17 ` Johannes Berg
2019-07-10 9:43 ` Russell King - ARM Linux admin
2019-07-11 21:30 ` David Miller
2019-07-12 12:54 ` Andrzej Hajda
8 siblings, 1 reply; 30+ messages in thread
From: Johannes Berg @ 2019-07-10 9:17 UTC (permalink / raw)
To: Joe Perches, Andrew Morton, Patrick Venture, Nancy Yuen,
Benjamin Fair, Andrew Jeffery, openbmc, linux-kernel,
linux-aspeed, linux-arm-kernel, linux-amlogic, netdev,
linux-mediatek, linux-stm32, linux-wireless, linux-media
Cc: linux-iio, devel, alsa-devel, linux-mmc, dri-devel
On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
> These GENMASK uses are inverted argument order and the
> actual masks produced are incorrect. Fix them.
>
> Add checkpatch tests to help avoid more misuses too.
>
> Joe Perches (12):
> checkpatch: Add GENMASK tests
IMHO this doesn't make a lot of sense as a checkpatch test - just throw
in a BUILD_BUG_ON()?
johannes
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 00/12] treewide: Fix GENMASK misuses
2019-07-10 9:17 ` [PATCH 00/12] treewide: Fix GENMASK misuses Johannes Berg
@ 2019-07-10 9:43 ` Russell King - ARM Linux admin
2019-07-10 15:45 ` Joe Perches
0 siblings, 1 reply; 30+ messages in thread
From: Russell King - ARM Linux admin @ 2019-07-10 9:43 UTC (permalink / raw)
To: Johannes Berg
Cc: devel, linux-mmc, alsa-devel, Benjamin Fair, linux-aspeed,
Andrew Jeffery, Patrick Venture, openbmc, linux-wireless,
linux-kernel, linux-iio, Nancy Yuen, linux-mediatek, dri-devel,
netdev, Joe Perches, linux-amlogic, Andrew Morton, linux-stm32,
linux-arm-kernel, linux-media
On Wed, Jul 10, 2019 at 11:17:31AM +0200, Johannes Berg wrote:
> On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
> > These GENMASK uses are inverted argument order and the
> > actual masks produced are incorrect. Fix them.
> >
> > Add checkpatch tests to help avoid more misuses too.
> >
> > Joe Perches (12):
> > checkpatch: Add GENMASK tests
>
> IMHO this doesn't make a lot of sense as a checkpatch test - just throw
> in a BUILD_BUG_ON()?
My personal take on this is that GENMASK() is really not useful, it's
just pure obfuscation and leads to exactly these kinds of mistakes.
Yes, I fully understand the argument that you can just specify the
start and end bits, and it _in theory_ makes the code more readable.
However, the problem is when writing code. GENMASK(a, b). Is a the
starting bit or ending bit? Is b the number of bits? It's confusing
and causes mistakes resulting in incorrect code. A BUILD_BUG_ON()
can catch some of the cases, but not all of them.
For example:
GENMASK(6, 2)
would satisify the requirement that a > b, so a BUILD_BUG_ON() will
not trigger, but was the author meaning 0x3c or 0xc0?
Personally, I've decided I am _not_ going to use GENMASK() in my code
because I struggle to get the macro arguments correct - I'm _much_
happier, and it is way more reliable for me to write the mask in hex
notation.
I think this is where use of a ternary operator would come in use. The
normal way of writing a number of bits tends to be "a:b", so if GENMASK
took something like GENMASK(6:2), then I'd have less issue with it,
because it's argument is then in a familiar notation.
Yes, I'm sure that someone will point out that the GENMASK arguments
are just in the same order, but that doesn't prevent _me_ frequently
getting it wrong - and that's the point. The macro seems to me to
cause more problems than it solves.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* RE: [PATCH 08/12] net: stmmac: Fix misuses of GENMASK macro
2019-07-10 5:04 ` [PATCH 08/12] net: stmmac: " Joe Perches
@ 2019-07-10 10:33 ` Jose Abreu
0 siblings, 0 replies; 30+ messages in thread
From: Jose Abreu @ 2019-07-10 10:33 UTC (permalink / raw)
To: Joe Perches, Andrew Morton, Giuseppe Cavallaro, Alexandre Torgue,
Maxime Coquelin, Maxime Ripard, Chen-Yu Tsai
Cc: netdev, linux-kernel, David S. Miller, linux-arm-kernel, linux-stm32
From: Joe Perches <joe@perches.com>
Date: Jul/10/2019, 06:04:21 (UTC+00:00)
> Arguments are supposed to be ordered high then low.
>
> Signed-off-by: Joe Perches <joe@perches.com>
If you submit another version please add:
Fixes: 293e4365a1ad ("stmmac: change descriptor layout")
Fixes: 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i")
---
Thanks,
Jose Miguel Abreu
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 00/12] treewide: Fix GENMASK misuses
2019-07-10 9:43 ` Russell King - ARM Linux admin
@ 2019-07-10 15:45 ` Joe Perches
2019-07-10 16:01 ` Joe Perches
0 siblings, 1 reply; 30+ messages in thread
From: Joe Perches @ 2019-07-10 15:45 UTC (permalink / raw)
To: Russell King - ARM Linux admin, Johannes Berg
Cc: devel, linux-mmc, alsa-devel, Benjamin Fair, linux-aspeed,
Andrew Jeffery, Patrick Venture, openbmc, linux-wireless,
linux-kernel, linux-iio, Nancy Yuen, linux-mediatek, dri-devel,
netdev, linux-amlogic, Andrew Morton, linux-stm32,
linux-arm-kernel, linux-media
On Wed, 2019-07-10 at 10:43 +0100, Russell King - ARM Linux admin wrote:
> On Wed, Jul 10, 2019 at 11:17:31AM +0200, Johannes Berg wrote:
> > On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
> > > These GENMASK uses are inverted argument order and the
> > > actual masks produced are incorrect. Fix them.
> > >
> > > Add checkpatch tests to help avoid more misuses too.
> > >
> > > Joe Perches (12):
> > > checkpatch: Add GENMASK tests
> >
> > IMHO this doesn't make a lot of sense as a checkpatch test - just throw
> > in a BUILD_BUG_ON()?
I tried that.
It'd can't be done as it's used in declarations
and included in asm files and it uses the UL()
macro.
I also tried just making it do the right thing
whatever the argument order.
Oh well.
> My personal take on this is that GENMASK() is really not useful, it's
> just pure obfuscation and leads to exactly these kinds of mistakes.
>
> Yes, I fully understand the argument that you can just specify the
> start and end bits, and it _in theory_ makes the code more readable.
>
> However, the problem is when writing code. GENMASK(a, b). Is a the
> starting bit or ending bit? Is b the number of bits? It's confusing
> and causes mistakes resulting in incorrect code. A BUILD_BUG_ON()
> can catch some of the cases, but not all of them.
It's a horrid little macro and I agree with Russell.
I also think if it existed at all it should have been
GENMASK(low, high) not GENMASK(high, low).
I
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 00/12] treewide: Fix GENMASK misuses
2019-07-10 15:45 ` Joe Perches
@ 2019-07-10 16:01 ` Joe Perches
0 siblings, 0 replies; 30+ messages in thread
From: Joe Perches @ 2019-07-10 16:01 UTC (permalink / raw)
To: Russell King - ARM Linux admin, Johannes Berg
Cc: devel, linux-mmc, alsa-devel, Benjamin Fair, linux-aspeed,
Andrew Jeffery, Patrick Venture, openbmc, linux-wireless,
linux-kernel, linux-iio, Nancy Yuen, linux-mediatek, dri-devel,
netdev, linux-amlogic, Andrew Morton, linux-stm32,
linux-arm-kernel, linux-media
On Wed, 2019-07-10 at 08:45 -0700, Joe Perches wrote:
> On Wed, 2019-07-10 at 10:43 +0100, Russell King - ARM Linux admin wrote:
> > On Wed, Jul 10, 2019 at 11:17:31AM +0200, Johannes Berg wrote:
> > > On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
> > > > These GENMASK uses are inverted argument order and the
> > > > actual masks produced are incorrect. Fix them.
> > > >
> > > > Add checkpatch tests to help avoid more misuses too.
> > > >
> > > > Joe Perches (12):
> > > > checkpatch: Add GENMASK tests
> > >
> > > IMHO this doesn't make a lot of sense as a checkpatch test - just throw
> > > in a BUILD_BUG_ON()?
>
> I tried that.
>
> It'd can't be done as it's used in declarations
> and included in asm files and it uses the UL()
> macro.
>
> I also tried just making it do the right thing
> whatever the argument order.
I forgot.
I also made all those arguments when it was
introduced in 2013.
https://lore.kernel.org/patchwork/patch/414248/
> Oh well.
yeah.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 00/12] treewide: Fix GENMASK misuses
2019-07-10 5:04 ` [PATCH 00/12] treewide: Fix GENMASK misuses Joe Perches
` (6 preceding siblings ...)
2019-07-10 9:17 ` [PATCH 00/12] treewide: Fix GENMASK misuses Johannes Berg
@ 2019-07-11 21:30 ` David Miller
2019-07-12 12:54 ` Andrzej Hajda
8 siblings, 0 replies; 30+ messages in thread
From: David Miller @ 2019-07-11 21:30 UTC (permalink / raw)
To: joe
Cc: devel, linux-iio, alsa-devel, benjaminfair, linux-aspeed, andrew,
venture, openbmc, linux-wireless, linux-kernel, dri-devel, yuenn,
linux-mmc, linux-mediatek, netdev, linux-amlogic, akpm,
linux-stm32, linux-arm-kernel, linux-media
From: Joe Perches <joe@perches.com>
Date: Tue, 9 Jul 2019 22:04:13 -0700
> These GENMASK uses are inverted argument order and the
> actual masks produced are incorrect. Fix them.
>
> Add checkpatch tests to help avoid more misuses too.
Patches #7 and #8 applied to 'net', with appropriate Fixes tags
added to #8.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 00/12] treewide: Fix GENMASK misuses
2019-07-10 5:04 ` [PATCH 00/12] treewide: Fix GENMASK misuses Joe Perches
` (7 preceding siblings ...)
2019-07-11 21:30 ` David Miller
@ 2019-07-12 12:54 ` Andrzej Hajda
8 siblings, 0 replies; 30+ messages in thread
From: Andrzej Hajda @ 2019-07-12 12:54 UTC (permalink / raw)
To: Joe Perches, Andrew Morton, Patrick Venture, Nancy Yuen,
Benjamin Fair, Andrew Jeffery, openbmc, linux-kernel,
linux-aspeed, linux-arm-kernel, linux-amlogic, netdev,
linux-mediatek, linux-stm32, linux-wireless, linux-media
Cc: linux-iio, devel, alsa-devel, linux-mmc, dri-devel
Hi Joe,
On 10.07.2019 07:04, Joe Perches wrote:
> These GENMASK uses are inverted argument order and the
> actual masks produced are incorrect. Fix them.
>
> Add checkpatch tests to help avoid more misuses too.
>
> Joe Perches (12):
> checkpatch: Add GENMASK tests
> clocksource/drivers/npcm: Fix misuse of GENMASK macro
> drm: aspeed_gfx: Fix misuse of GENMASK macro
> iio: adc: max9611: Fix misuse of GENMASK macro
> irqchip/gic-v3-its: Fix misuse of GENMASK macro
> mmc: meson-mx-sdio: Fix misuse of GENMASK macro
> net: ethernet: mediatek: Fix misuses of GENMASK macro
> net: stmmac: Fix misuses of GENMASK macro
> rtw88: Fix misuse of GENMASK macro
> phy: amlogic: G12A: Fix misuse of GENMASK macro
> staging: media: cedrus: Fix misuse of GENMASK macro
> ASoC: wcd9335: Fix misuse of GENMASK macro
>
> drivers/clocksource/timer-npcm7xx.c | 2 +-
> drivers/gpu/drm/aspeed/aspeed_gfx.h | 2 +-
> drivers/iio/adc/max9611.c | 2 +-
> drivers/irqchip/irq-gic-v3-its.c | 2 +-
> drivers/mmc/host/meson-mx-sdio.c | 2 +-
> drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 +-
> drivers/net/ethernet/mediatek/mtk_sgmii.c | 2 +-
> drivers/net/ethernet/stmicro/stmmac/descs.h | 2 +-
> drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 4 ++--
> drivers/net/wireless/realtek/rtw88/rtw8822b.c | 2 +-
> drivers/phy/amlogic/phy-meson-g12a-usb2.c | 2 +-
> drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 2 +-
> scripts/checkpatch.pl | 15 +++++++++++++++
> sound/soc/codecs/wcd-clsh-v2.c | 2 +-
> 14 files changed, 29 insertions(+), 14 deletions(-)
>
After adding following compile time check:
------
diff --git a/Makefile b/Makefile
index 5102b2bbd224..ac4ea5f443a9 100644
--- a/Makefile
+++ b/Makefile
@@ -457,7 +457,7 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
-Werror=implicit-function-declaration
-Werror=implicit-int \
- -Wno-format-security \
+ -Wno-format-security -Werror=div-by-zero \
-std=gnu89
KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_AFLAGS_KERNEL :=
diff --git a/include/linux/bits.h b/include/linux/bits.h
index 669d69441a62..61d74b103055 100644
--- a/include/linux/bits.h
+++ b/include/linux/bits.h
@@ -19,11 +19,11 @@
* GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000.
*/
#define GENMASK(h, l) \
- (((~UL(0)) - (UL(1) << (l)) + 1) & \
+ (((~UL(0)) - (UL(1) << (l)) + 1 + 0/((h) >= (l))) & \
(~UL(0) >> (BITS_PER_LONG - 1 - (h))))
#define GENMASK_ULL(h, l) \
- (((~ULL(0)) - (ULL(1) << (l)) + 1) & \
+ (((~ULL(0)) - (ULL(1) << (l)) + 1 + 0/((h) >= (l))) & \
(~ULL(0) >> (BITS_PER_LONG_LONG - 1 - (h))))
#endif /* __LINUX_BITS_H */
-------
I was able to detect one more GENMASK misue (AARCH64, allyesconfig):
CC drivers/phy/rockchip/phy-rockchip-inno-hdmi.o
In file included from ../include/linux/bitops.h:5:0,
from ../include/linux/kernel.h:12,
from ../include/linux/clk.h:13,
from ../drivers/phy/rockchip/phy-rockchip-inno-hdmi.c:9:
../drivers/phy/rockchip/phy-rockchip-inno-hdmi.c: In function
‘inno_hdmi_phy_rk3328_power_on’:
../include/linux/bits.h:22:37: error: division by zero [-Werror=div-by-zero]
(((~UL(0)) - (UL(1) << (l)) + 1 + 0/((h) >= (l))) & \
^
../drivers/phy/rockchip/phy-rockchip-inno-hdmi.c:24:42: note: in
expansion of macro ‘GENMASK’
#define UPDATE(x, h, l) (((x) << (l)) & GENMASK((h), (l)))
^~~~~~~
../drivers/phy/rockchip/phy-rockchip-inno-hdmi.c:201:50: note: in
expansion of macro ‘UPDATE’
#define RK3328_TERM_RESISTOR_CALIB_SPEED_7_0(x) UPDATE(x, 7, 9)
^~~~~~
../drivers/phy/rockchip/phy-rockchip-inno-hdmi.c:1046:26: note: in
expansion of macro ‘RK3328_TERM_RESISTOR_CALIB_SPEED_7_0’
inno_write(inno, 0xc6, RK3328_TERM_RESISTOR_CALIB_SPEED_7_0(v));
Of course I do not advise to add the check as is to Kernel - it is
undefined behavior area AFAIK.
Regards
Andrzej
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH 10/12] phy: amlogic: G12A: Fix misuse of GENMASK macro
2019-07-10 5:04 ` [PATCH 10/12] phy: amlogic: G12A: Fix misuse " Joe Perches
@ 2019-07-22 7:23 ` Neil Armstrong
2019-08-23 2:41 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 30+ messages in thread
From: Neil Armstrong @ 2019-07-22 7:23 UTC (permalink / raw)
To: Joe Perches, Andrew Morton, Kevin Hilman
Cc: linux-amlogic, linux-kernel, linux-arm-kernel, Kishon Vijay Abraham I
On 10/07/2019 07:04, Joe Perches wrote:
> Arguments are supposed to be ordered high then low.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/phy/amlogic/phy-meson-g12a-usb2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb2.c b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
> index 9065ffc85eb4..cd7eccab2649 100644
> --- a/drivers/phy/amlogic/phy-meson-g12a-usb2.c
> +++ b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
> @@ -66,7 +66,7 @@
> #define PHY_CTRL_R14 0x38
> #define PHY_CTRL_R14_I_RDP_EN BIT(0)
> #define PHY_CTRL_R14_I_RPU_SW1_EN BIT(1)
> - #define PHY_CTRL_R14_I_RPU_SW2_EN GENMASK(2, 3)
> + #define PHY_CTRL_R14_I_RPU_SW2_EN GENMASK(3, 2)
> #define PHY_CTRL_R14_PG_RSTN BIT(4)
> #define PHY_CTRL_R14_I_C2L_DATA_16_8 BIT(5)
> #define PHY_CTRL_R14_I_C2L_ASSERT_SINGLE_EN_ZERO BIT(6)
>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 06/12] mmc: meson-mx-sdio: Fix misuse of GENMASK macro
2019-07-10 5:04 ` [PATCH 06/12] mmc: meson-mx-sdio: " Joe Perches
@ 2019-07-22 7:23 ` Neil Armstrong
2019-07-22 13:43 ` Ulf Hansson
1 sibling, 0 replies; 30+ messages in thread
From: Neil Armstrong @ 2019-07-22 7:23 UTC (permalink / raw)
To: Joe Perches, Andrew Morton, Kevin Hilman
Cc: linux-amlogic, Ulf Hansson, linux-mmc, linux-kernel, linux-arm-kernel
On 10/07/2019 07:04, Joe Perches wrote:
> Arguments are supposed to be ordered high then low.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/mmc/host/meson-mx-sdio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c
> index 2d736e416775..ba9a63db73da 100644
> --- a/drivers/mmc/host/meson-mx-sdio.c
> +++ b/drivers/mmc/host/meson-mx-sdio.c
> @@ -73,7 +73,7 @@
> #define MESON_MX_SDIO_IRQC_IF_CONFIG_MASK GENMASK(7, 6)
> #define MESON_MX_SDIO_IRQC_FORCE_DATA_CLK BIT(8)
> #define MESON_MX_SDIO_IRQC_FORCE_DATA_CMD BIT(9)
> - #define MESON_MX_SDIO_IRQC_FORCE_DATA_DAT_MASK GENMASK(10, 13)
> + #define MESON_MX_SDIO_IRQC_FORCE_DATA_DAT_MASK GENMASK(13, 10)
> #define MESON_MX_SDIO_IRQC_SOFT_RESET BIT(15)
> #define MESON_MX_SDIO_IRQC_FORCE_HALT BIT(30)
> #define MESON_MX_SDIO_IRQC_HALT_HOLE BIT(31)
>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 06/12] mmc: meson-mx-sdio: Fix misuse of GENMASK macro
2019-07-10 5:04 ` [PATCH 06/12] mmc: meson-mx-sdio: " Joe Perches
2019-07-22 7:23 ` Neil Armstrong
@ 2019-07-22 13:43 ` Ulf Hansson
1 sibling, 0 replies; 30+ messages in thread
From: Ulf Hansson @ 2019-07-22 13:43 UTC (permalink / raw)
To: Joe Perches
Cc: Kevin Hilman, linux-mmc, Linux Kernel Mailing List,
open list:ARM/Amlogic Meson...,
Andrew Morton, Linux ARM
On Wed, 10 Jul 2019 at 07:04, Joe Perches <joe@perches.com> wrote:
>
> Arguments are supposed to be ordered high then low.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied for fixes by adding a fixes+stable tag, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/meson-mx-sdio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c
> index 2d736e416775..ba9a63db73da 100644
> --- a/drivers/mmc/host/meson-mx-sdio.c
> +++ b/drivers/mmc/host/meson-mx-sdio.c
> @@ -73,7 +73,7 @@
> #define MESON_MX_SDIO_IRQC_IF_CONFIG_MASK GENMASK(7, 6)
> #define MESON_MX_SDIO_IRQC_FORCE_DATA_CLK BIT(8)
> #define MESON_MX_SDIO_IRQC_FORCE_DATA_CMD BIT(9)
> - #define MESON_MX_SDIO_IRQC_FORCE_DATA_DAT_MASK GENMASK(10, 13)
> + #define MESON_MX_SDIO_IRQC_FORCE_DATA_DAT_MASK GENMASK(13, 10)
> #define MESON_MX_SDIO_IRQC_SOFT_RESET BIT(15)
> #define MESON_MX_SDIO_IRQC_FORCE_HALT BIT(30)
> #define MESON_MX_SDIO_IRQC_HALT_HOLE BIT(31)
> --
> 2.15.0
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 11/12] staging: media: cedrus: Fix misuse of GENMASK macro
2019-07-10 5:04 ` [PATCH 11/12] staging: media: cedrus: " Joe Perches
2019-07-10 7:23 ` Paul Kocialkowski
@ 2019-07-24 17:09 ` Joe Perches
2019-07-24 18:35 ` Greg Kroah-Hartman
2019-07-25 6:46 ` Hans Verkuil
1 sibling, 2 replies; 30+ messages in thread
From: Joe Perches @ 2019-07-24 17:09 UTC (permalink / raw)
To: Andrew Morton, Maxime Ripard, Paul Kocialkowski, Chen-Yu Tsai
Cc: devel, Greg Kroah-Hartman, linux-kernel, Mauro Carvalho Chehab,
linux-arm-kernel, linux-media
On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
> Arguments are supposed to be ordered high then low.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> index 3e9931416e45..ddd29788d685 100644
> --- a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> +++ b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> @@ -110,7 +110,7 @@
> #define VE_DEC_MPEG_MBADDR (VE_ENGINE_DEC_MPEG + 0x10)
>
> #define VE_DEC_MPEG_MBADDR_X(w) (((w) << 8) & GENMASK(15, 8))
> -#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(0, 7))
> +#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(7, 0))
>
> #define VE_DEC_MPEG_CTRL (VE_ENGINE_DEC_MPEG + 0x14)
Greg? ping?
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 03/12] drm: aspeed_gfx: Fix misuse of GENMASK macro
2019-07-10 5:04 ` [PATCH 03/12] drm: aspeed_gfx: Fix misuse of GENMASK macro Joe Perches
@ 2019-07-24 17:16 ` Joe Perches
2019-07-25 1:10 ` Andrew Jeffery
0 siblings, 1 reply; 30+ messages in thread
From: Joe Perches @ 2019-07-24 17:16 UTC (permalink / raw)
To: Andrew Morton, Joel Stanley, Andrew Jeffery
Cc: linux-aspeed, David Airlie, linux-kernel, dri-devel,
Daniel Vetter, linux-arm-kernel
On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
> Arguments are supposed to be ordered high then low.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/gpu/drm/aspeed/aspeed_gfx.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx.h b/drivers/gpu/drm/aspeed/aspeed_gfx.h
> index a10358bb61ec..095ea03e5833 100644
> --- a/drivers/gpu/drm/aspeed/aspeed_gfx.h
> +++ b/drivers/gpu/drm/aspeed/aspeed_gfx.h
> @@ -74,7 +74,7 @@ int aspeed_gfx_create_output(struct drm_device *drm);
> /* CTRL2 */
> #define CRT_CTRL_DAC_EN BIT(0)
> #define CRT_CTRL_VBLANK_LINE(x) (((x) << 20) & CRT_CTRL_VBLANK_LINE_MASK)
> -#define CRT_CTRL_VBLANK_LINE_MASK GENMASK(20, 31)
> +#define CRT_CTRL_VBLANK_LINE_MASK GENMASK(31, 20)
ping?
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 11/12] staging: media: cedrus: Fix misuse of GENMASK macro
2019-07-24 17:09 ` Joe Perches
@ 2019-07-24 18:35 ` Greg Kroah-Hartman
2019-07-24 18:39 ` Joe Perches
2019-07-25 6:46 ` Hans Verkuil
1 sibling, 1 reply; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-07-24 18:35 UTC (permalink / raw)
To: Joe Perches
Cc: devel, Maxime Ripard, linux-kernel, Paul Kocialkowski,
Chen-Yu Tsai, Andrew Morton, Mauro Carvalho Chehab,
linux-arm-kernel, linux-media
On Wed, Jul 24, 2019 at 10:09:44AM -0700, Joe Perches wrote:
> On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
> > Arguments are supposed to be ordered high then low.
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
> > ---
> > drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> > index 3e9931416e45..ddd29788d685 100644
> > --- a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> > +++ b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> > @@ -110,7 +110,7 @@
> > #define VE_DEC_MPEG_MBADDR (VE_ENGINE_DEC_MPEG + 0x10)
> >
> > #define VE_DEC_MPEG_MBADDR_X(w) (((w) << 8) & GENMASK(15, 8))
> > -#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(0, 7))
> > +#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(7, 0))
> >
> > #define VE_DEC_MPEG_CTRL (VE_ENGINE_DEC_MPEG + 0x14)
>
> Greg? ping?
>
>
I am not the maintainer of drivers/staging/media, that is Mauro.
thanks,
greg k-h
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 11/12] staging: media: cedrus: Fix misuse of GENMASK macro
2019-07-24 18:35 ` Greg Kroah-Hartman
@ 2019-07-24 18:39 ` Joe Perches
2019-07-24 18:55 ` Greg Kroah-Hartman
0 siblings, 1 reply; 30+ messages in thread
From: Joe Perches @ 2019-07-24 18:39 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: devel, Maxime Ripard, linux-kernel, Paul Kocialkowski,
Chen-Yu Tsai, Andrew Morton, Mauro Carvalho Chehab,
linux-arm-kernel, linux-media
On Wed, 2019-07-24 at 20:35 +0200, Greg Kroah-Hartman wrote:
> On Wed, Jul 24, 2019 at 10:09:44AM -0700, Joe Perches wrote:
> > On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
> > > Arguments are supposed to be ordered high then low.
> > >
> > > Signed-off-by: Joe Perches <joe@perches.com>
> > > ---
> > > drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> > > index 3e9931416e45..ddd29788d685 100644
> > > --- a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> > > +++ b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> > > @@ -110,7 +110,7 @@
> > > #define VE_DEC_MPEG_MBADDR (VE_ENGINE_DEC_MPEG + 0x10)
> > >
> > > #define VE_DEC_MPEG_MBADDR_X(w) (((w) << 8) & GENMASK(15, 8))
> > > -#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(0, 7))
> > > +#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(7, 0))
> > >
> > > #define VE_DEC_MPEG_CTRL (VE_ENGINE_DEC_MPEG + 0x14)
> >
> > Greg? ping?
> >
> >
>
> I am not the maintainer of drivers/staging/media, that is Mauro.
Maybe you want:
---
diff --git a/MAINTAINERS b/MAINTAINERS
index f7dc5bad396a..2fb95ad6ebef 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15312,6 +15312,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
L: devel@driverdev.osuosl.org
S: Supported
F: drivers/staging/
+X: drivers/staging/media/
STARFIRE/DURALAN NETWORK DRIVER
M: Ion Badulescu <ionut@badula.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH 11/12] staging: media: cedrus: Fix misuse of GENMASK macro
2019-07-24 18:39 ` Joe Perches
@ 2019-07-24 18:55 ` Greg Kroah-Hartman
0 siblings, 0 replies; 30+ messages in thread
From: Greg Kroah-Hartman @ 2019-07-24 18:55 UTC (permalink / raw)
To: Joe Perches
Cc: devel, Maxime Ripard, linux-kernel, Paul Kocialkowski,
Chen-Yu Tsai, Andrew Morton, Mauro Carvalho Chehab,
linux-arm-kernel, linux-media
On Wed, Jul 24, 2019 at 11:39:03AM -0700, Joe Perches wrote:
> On Wed, 2019-07-24 at 20:35 +0200, Greg Kroah-Hartman wrote:
> > On Wed, Jul 24, 2019 at 10:09:44AM -0700, Joe Perches wrote:
> > > On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
> > > > Arguments are supposed to be ordered high then low.
> > > >
> > > > Signed-off-by: Joe Perches <joe@perches.com>
> > > > ---
> > > > drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> > > > index 3e9931416e45..ddd29788d685 100644
> > > > --- a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> > > > +++ b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
> > > > @@ -110,7 +110,7 @@
> > > > #define VE_DEC_MPEG_MBADDR (VE_ENGINE_DEC_MPEG + 0x10)
> > > >
> > > > #define VE_DEC_MPEG_MBADDR_X(w) (((w) << 8) & GENMASK(15, 8))
> > > > -#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(0, 7))
> > > > +#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(7, 0))
> > > >
> > > > #define VE_DEC_MPEG_CTRL (VE_ENGINE_DEC_MPEG + 0x14)
> > >
> > > Greg? ping?
> > >
> > >
> >
> > I am not the maintainer of drivers/staging/media, that is Mauro.
>
> Maybe you want:
> ---
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f7dc5bad396a..2fb95ad6ebef 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -15312,6 +15312,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> L: devel@driverdev.osuosl.org
> S: Supported
> F: drivers/staging/
> +X: drivers/staging/media/
>
Not really, it's nice to see the patches flow by :)
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 03/12] drm: aspeed_gfx: Fix misuse of GENMASK macro
2019-07-24 17:16 ` Joe Perches
@ 2019-07-25 1:10 ` Andrew Jeffery
2019-07-25 1:18 ` Joe Perches
0 siblings, 1 reply; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-25 1:10 UTC (permalink / raw)
To: Joe Perches, Andrew Morton, Joel Stanley
Cc: linux-aspeed, David Airlie, linux-kernel, dri-devel,
Daniel Vetter, linux-arm-kernel
On Thu, 25 Jul 2019, at 02:46, Joe Perches wrote:
> On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
> > Arguments are supposed to be ordered high then low.
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
> > ---
> > drivers/gpu/drm/aspeed/aspeed_gfx.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx.h b/drivers/gpu/drm/aspeed/aspeed_gfx.h
> > index a10358bb61ec..095ea03e5833 100644
> > --- a/drivers/gpu/drm/aspeed/aspeed_gfx.h
> > +++ b/drivers/gpu/drm/aspeed/aspeed_gfx.h
> > @@ -74,7 +74,7 @@ int aspeed_gfx_create_output(struct drm_device *drm);
> > /* CTRL2 */
> > #define CRT_CTRL_DAC_EN BIT(0)
> > #define CRT_CTRL_VBLANK_LINE(x) (((x) << 20) & CRT_CTRL_VBLANK_LINE_MASK)
> > -#define CRT_CTRL_VBLANK_LINE_MASK GENMASK(20, 31)
> > +#define CRT_CTRL_VBLANK_LINE_MASK GENMASK(31, 20)
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
>
> ping?
>
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 03/12] drm: aspeed_gfx: Fix misuse of GENMASK macro
2019-07-25 1:10 ` Andrew Jeffery
@ 2019-07-25 1:18 ` Joe Perches
2019-07-25 2:52 ` Joel Stanley
0 siblings, 1 reply; 30+ messages in thread
From: Joe Perches @ 2019-07-25 1:18 UTC (permalink / raw)
To: Andrew Jeffery, Andrew Morton, Joel Stanley
Cc: linux-aspeed, David Airlie, linux-kernel, dri-devel,
Daniel Vetter, linux-arm-kernel
On Thu, 2019-07-25 at 10:40 +0930, Andrew Jeffery wrote:
>
> On Thu, 25 Jul 2019, at 02:46, Joe Perches wrote:
> > On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
> > > Arguments are supposed to be ordered high then low.
> > >
> > > Signed-off-by: Joe Perches <joe@perches.com>
> > > ---
> > > drivers/gpu/drm/aspeed/aspeed_gfx.h | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx.h b/drivers/gpu/drm/aspeed/aspeed_gfx.h
> > > index a10358bb61ec..095ea03e5833 100644
> > > --- a/drivers/gpu/drm/aspeed/aspeed_gfx.h
> > > +++ b/drivers/gpu/drm/aspeed/aspeed_gfx.h
> > > @@ -74,7 +74,7 @@ int aspeed_gfx_create_output(struct drm_device *drm);
> > > /* CTRL2 */
> > > #define CRT_CTRL_DAC_EN BIT(0)
> > > #define CRT_CTRL_VBLANK_LINE(x) (((x) << 20) & CRT_CTRL_VBLANK_LINE_MASK)
> > > -#define CRT_CTRL_VBLANK_LINE_MASK GENMASK(20, 31)
> > > +#define CRT_CTRL_VBLANK_LINE_MASK GENMASK(31, 20)
>
> Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
This hardly needs a review, it needs to be applied.
There's a nominal git tree for aspeed here:
T: git git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed.git
But who's going to do apply this?
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 03/12] drm: aspeed_gfx: Fix misuse of GENMASK macro
2019-07-25 1:18 ` Joe Perches
@ 2019-07-25 2:52 ` Joel Stanley
2019-07-25 14:37 ` Joe Perches
0 siblings, 1 reply; 30+ messages in thread
From: Joel Stanley @ 2019-07-25 2:52 UTC (permalink / raw)
To: Joe Perches
Cc: linux-aspeed, Andrew Jeffery, Linux Kernel Mailing List,
dri-devel, David Airlie, Daniel Vetter, Andrew Morton, Linux ARM
On Thu, 25 Jul 2019 at 01:18, Joe Perches <joe@perches.com> wrote:
>
> On Thu, 2019-07-25 at 10:40 +0930, Andrew Jeffery wrote:
> >
> > On Thu, 25 Jul 2019, at 02:46, Joe Perches wrote:
> > > On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
> > > > Arguments are supposed to be ordered high then low.
> > > >
> > > > Signed-off-by: Joe Perches <joe@perches.com>
> > > > ---
> > > > drivers/gpu/drm/aspeed/aspeed_gfx.h | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx.h b/drivers/gpu/drm/aspeed/aspeed_gfx.h
> > > > index a10358bb61ec..095ea03e5833 100644
> > > > --- a/drivers/gpu/drm/aspeed/aspeed_gfx.h
> > > > +++ b/drivers/gpu/drm/aspeed/aspeed_gfx.h
> > > > @@ -74,7 +74,7 @@ int aspeed_gfx_create_output(struct drm_device *drm);
> > > > /* CTRL2 */
> > > > #define CRT_CTRL_DAC_EN BIT(0)
> > > > #define CRT_CTRL_VBLANK_LINE(x) (((x) << 20) & CRT_CTRL_VBLANK_LINE_MASK)
> > > > -#define CRT_CTRL_VBLANK_LINE_MASK GENMASK(20, 31)
> > > > +#define CRT_CTRL_VBLANK_LINE_MASK GENMASK(31, 20)
> >
> > Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
>
> This hardly needs a review, it needs to be applied.
> There's a nominal git tree for aspeed here:
>
> T: git git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed.git
>
> But who's going to do apply this?
This is a DRM patch, so it goes through the DRM tree. I am a
co-maintainer there and can apply it once I remember how to drive the
tools.
(FYI, this macro is not used by the current driver).
Cheers,
Joel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 11/12] staging: media: cedrus: Fix misuse of GENMASK macro
2019-07-24 17:09 ` Joe Perches
2019-07-24 18:35 ` Greg Kroah-Hartman
@ 2019-07-25 6:46 ` Hans Verkuil
1 sibling, 0 replies; 30+ messages in thread
From: Hans Verkuil @ 2019-07-25 6:46 UTC (permalink / raw)
To: Joe Perches, Andrew Morton, Maxime Ripard, Paul Kocialkowski,
Chen-Yu Tsai
Cc: devel, Greg Kroah-Hartman, linux-kernel, Mauro Carvalho Chehab,
linux-arm-kernel, linux-media
On 7/24/19 7:09 PM, Joe Perches wrote:
> On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
>> Arguments are supposed to be ordered high then low.
>>
>> Signed-off-by: Joe Perches <joe@perches.com>
>> ---
>> drivers/staging/media/sunxi/cedrus/cedrus_regs.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
>> index 3e9931416e45..ddd29788d685 100644
>> --- a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
>> +++ b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
>> @@ -110,7 +110,7 @@
>> #define VE_DEC_MPEG_MBADDR (VE_ENGINE_DEC_MPEG + 0x10)
>>
>> #define VE_DEC_MPEG_MBADDR_X(w) (((w) << 8) & GENMASK(15, 8))
>> -#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(0, 7))
>> +#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(7, 0))
>>
>> #define VE_DEC_MPEG_CTRL (VE_ENGINE_DEC_MPEG + 0x14)
>
> Greg? ping?
>
>
It's actually me and I'm about to pick this one up and make a PR for Mauro.
Regards,
Hans
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 03/12] drm: aspeed_gfx: Fix misuse of GENMASK macro
2019-07-25 2:52 ` Joel Stanley
@ 2019-07-25 14:37 ` Joe Perches
0 siblings, 0 replies; 30+ messages in thread
From: Joe Perches @ 2019-07-25 14:37 UTC (permalink / raw)
To: Joel Stanley
Cc: linux-aspeed, Andrew Jeffery, Linux Kernel Mailing List,
dri-devel, David Airlie, Daniel Vetter, Andrew Morton, Linux ARM
On Thu, 2019-07-25 at 02:52 +0000, Joel Stanley wrote:
> On Thu, 25 Jul 2019 at 01:18, Joe Perches <joe@perches.com> wrote:
> > On Thu, 2019-07-25 at 10:40 +0930, Andrew Jeffery wrote:
> > > On Thu, 25 Jul 2019, at 02:46, Joe Perches wrote:
> > > > On Tue, 2019-07-09 at 22:04 -0700, Joe Perches wrote:
> > > > > Arguments are supposed to be ordered high then low.
> > > > >
> > > > > Signed-off-by: Joe Perches <joe@perches.com>
> > > > > ---
> > > > > drivers/gpu/drm/aspeed/aspeed_gfx.h | 2 +-
> > > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx.h b/drivers/gpu/drm/aspeed/aspeed_gfx.h
> > > > > index a10358bb61ec..095ea03e5833 100644
> > > > > --- a/drivers/gpu/drm/aspeed/aspeed_gfx.h
> > > > > +++ b/drivers/gpu/drm/aspeed/aspeed_gfx.h
> > > > > @@ -74,7 +74,7 @@ int aspeed_gfx_create_output(struct drm_device *drm);
> > > > > /* CTRL2 */
> > > > > #define CRT_CTRL_DAC_EN BIT(0)
> > > > > #define CRT_CTRL_VBLANK_LINE(x) (((x) << 20) & CRT_CTRL_VBLANK_LINE_MASK)
> > > > > -#define CRT_CTRL_VBLANK_LINE_MASK GENMASK(20, 31)
> > > > > +#define CRT_CTRL_VBLANK_LINE_MASK GENMASK(31, 20)
> > >
> > > Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> >
> > This hardly needs a review, it needs to be applied.
> > There's a nominal git tree for aspeed here:
> >
> > T: git git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed.git
> >
> > But who's going to do apply this?
>
> This is a DRM patch, so it goes through the DRM tree. I am a
> co-maintainer there and can apply it once I remember how to drive the
> tools.
>
> (FYI, this macro is not used by the current driver).
Then perhaps CRT_CTRL_VBLANK and _MASK defines
should be removed instead.
cheers, Joe
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 10/12] phy: amlogic: G12A: Fix misuse of GENMASK macro
2019-07-22 7:23 ` Neil Armstrong
@ 2019-08-23 2:41 ` Kishon Vijay Abraham I
2019-08-23 4:59 ` Joe Perches
0 siblings, 1 reply; 30+ messages in thread
From: Kishon Vijay Abraham I @ 2019-08-23 2:41 UTC (permalink / raw)
To: Neil Armstrong, Joe Perches, Andrew Morton, Kevin Hilman
Cc: linux-amlogic, linux-kernel, linux-arm-kernel
On 22/07/19 12:53 PM, Neil Armstrong wrote:
> On 10/07/2019 07:04, Joe Perches wrote:
>> Arguments are supposed to be ordered high then low.
>>
>> Signed-off-by: Joe Perches <joe@perches.com>
>> ---
>> drivers/phy/amlogic/phy-meson-g12a-usb2.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb2.c b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
>> index 9065ffc85eb4..cd7eccab2649 100644
>> --- a/drivers/phy/amlogic/phy-meson-g12a-usb2.c
>> +++ b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
>> @@ -66,7 +66,7 @@
>> #define PHY_CTRL_R14 0x38
>> #define PHY_CTRL_R14_I_RDP_EN BIT(0)
>> #define PHY_CTRL_R14_I_RPU_SW1_EN BIT(1)
>> - #define PHY_CTRL_R14_I_RPU_SW2_EN GENMASK(2, 3)
>> + #define PHY_CTRL_R14_I_RPU_SW2_EN GENMASK(3, 2)
>> #define PHY_CTRL_R14_PG_RSTN BIT(4)
>> #define PHY_CTRL_R14_I_C2L_DATA_16_8 BIT(5)
>> #define PHY_CTRL_R14_I_C2L_ASSERT_SINGLE_EN_ZERO BIT(6)
>>
>
> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Shouldn't this go to stable trees as well?
-Kishon
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 10/12] phy: amlogic: G12A: Fix misuse of GENMASK macro
2019-08-23 2:41 ` Kishon Vijay Abraham I
@ 2019-08-23 4:59 ` Joe Perches
0 siblings, 0 replies; 30+ messages in thread
From: Joe Perches @ 2019-08-23 4:59 UTC (permalink / raw)
To: Kishon Vijay Abraham I, Neil Armstrong, Andrew Morton, Kevin Hilman
Cc: linux-amlogic, linux-kernel, linux-arm-kernel
On Fri, 2019-08-23 at 08:11 +0530, Kishon Vijay Abraham I wrote:
>
> On 22/07/19 12:53 PM, Neil Armstrong wrote:
> > On 10/07/2019 07:04, Joe Perches wrote:
> > > Arguments are supposed to be ordered high then low.
> > >
> > > Signed-off-by: Joe Perches <joe@perches.com>
> > > ---
> > > drivers/phy/amlogic/phy-meson-g12a-usb2.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb2.c b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
> > > index 9065ffc85eb4..cd7eccab2649 100644
> > > --- a/drivers/phy/amlogic/phy-meson-g12a-usb2.c
> > > +++ b/drivers/phy/amlogic/phy-meson-g12a-usb2.c
> > > @@ -66,7 +66,7 @@
> > > #define PHY_CTRL_R14 0x38
> > > #define PHY_CTRL_R14_I_RDP_EN BIT(0)
> > > #define PHY_CTRL_R14_I_RPU_SW1_EN BIT(1)
> > > - #define PHY_CTRL_R14_I_RPU_SW2_EN GENMASK(2, 3)
> > > + #define PHY_CTRL_R14_I_RPU_SW2_EN GENMASK(3, 2)
> > > #define PHY_CTRL_R14_PG_RSTN BIT(4)
> > > #define PHY_CTRL_R14_I_C2L_DATA_16_8 BIT(5)
> > > #define PHY_CTRL_R14_I_C2L_ASSERT_SINGLE_EN_ZERO BIT(6)
> > >
> >
> > Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
>
> Shouldn't this go to stable trees as well?
The macro define is unused so it doesn't have to go into stable.
> -Kishon
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 30+ messages in thread
end of thread, other threads:[~2019-08-23 5:00 UTC | newest]
Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20190710050444epcas1p250f7aa0f8798a7757df51d66f5970c2a@epcas1p2.samsung.com>
2019-07-10 5:04 ` [PATCH 00/12] treewide: Fix GENMASK misuses Joe Perches
2019-07-10 5:04 ` [PATCH 03/12] drm: aspeed_gfx: Fix misuse of GENMASK macro Joe Perches
2019-07-24 17:16 ` Joe Perches
2019-07-25 1:10 ` Andrew Jeffery
2019-07-25 1:18 ` Joe Perches
2019-07-25 2:52 ` Joel Stanley
2019-07-25 14:37 ` Joe Perches
2019-07-10 5:04 ` [PATCH 06/12] mmc: meson-mx-sdio: " Joe Perches
2019-07-22 7:23 ` Neil Armstrong
2019-07-22 13:43 ` Ulf Hansson
2019-07-10 5:04 ` [PATCH 07/12] net: ethernet: mediatek: Fix misuses " Joe Perches
2019-07-10 5:04 ` [PATCH 08/12] net: stmmac: " Joe Perches
2019-07-10 10:33 ` Jose Abreu
2019-07-10 5:04 ` [PATCH 10/12] phy: amlogic: G12A: Fix misuse " Joe Perches
2019-07-22 7:23 ` Neil Armstrong
2019-08-23 2:41 ` Kishon Vijay Abraham I
2019-08-23 4:59 ` Joe Perches
2019-07-10 5:04 ` [PATCH 11/12] staging: media: cedrus: " Joe Perches
2019-07-10 7:23 ` Paul Kocialkowski
2019-07-24 17:09 ` Joe Perches
2019-07-24 18:35 ` Greg Kroah-Hartman
2019-07-24 18:39 ` Joe Perches
2019-07-24 18:55 ` Greg Kroah-Hartman
2019-07-25 6:46 ` Hans Verkuil
2019-07-10 9:17 ` [PATCH 00/12] treewide: Fix GENMASK misuses Johannes Berg
2019-07-10 9:43 ` Russell King - ARM Linux admin
2019-07-10 15:45 ` Joe Perches
2019-07-10 16:01 ` Joe Perches
2019-07-11 21:30 ` David Miller
2019-07-12 12:54 ` Andrzej Hajda
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).