2019-07-10 05:05:23

by Joe Perches

[permalink] [raw]
Subject: [PATCH 02/12] clocksource/drivers/npcm: Fix misuse of GENMASK macro

Arguments are supposed to be ordered high then low.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/clocksource/timer-npcm7xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-npcm7xx.c b/drivers/clocksource/timer-npcm7xx.c
index 7a9bb5532d99..8a30da7f083b 100644
--- a/drivers/clocksource/timer-npcm7xx.c
+++ b/drivers/clocksource/timer-npcm7xx.c
@@ -32,7 +32,7 @@
#define NPCM7XX_Tx_INTEN BIT(29)
#define NPCM7XX_Tx_COUNTEN BIT(30)
#define NPCM7XX_Tx_ONESHOT 0x0
-#define NPCM7XX_Tx_OPER GENMASK(3, 27)
+#define NPCM7XX_Tx_OPER GENMASK(27, 3)
#define NPCM7XX_Tx_MIN_PRESCALE 0x1
#define NPCM7XX_Tx_TDR_MASK_BITS 24
#define NPCM7XX_Tx_MAX_CNT 0xFFFFFF
--
2.15.0


Subject: [tip:timers/urgent] clocksource/drivers/npcm: Fix misuse of GENMASK macro

Commit-ID: 9bdd7bb3a8447fe841cd37ddd9e0a6974b06a0bb
Gitweb: https://git.kernel.org/tip/9bdd7bb3a8447fe841cd37ddd9e0a6974b06a0bb
Author: Joe Perches <[email protected]>
AuthorDate: Tue, 9 Jul 2019 22:04:15 -0700
Committer: Thomas Gleixner <[email protected]>
CommitDate: Wed, 10 Jul 2019 11:05:26 +0200

clocksource/drivers/npcm: Fix misuse of GENMASK macro

Arguments are supposed to be ordered high then low.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lkml.kernel.org/r/d6a9d49c9837d38816b71d783f5aed7235e8ca94.1562734889.git.joe@perches.com

---
drivers/clocksource/timer-npcm7xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-npcm7xx.c b/drivers/clocksource/timer-npcm7xx.c
index 7a9bb5532d99..8a30da7f083b 100644
--- a/drivers/clocksource/timer-npcm7xx.c
+++ b/drivers/clocksource/timer-npcm7xx.c
@@ -32,7 +32,7 @@
#define NPCM7XX_Tx_INTEN BIT(29)
#define NPCM7XX_Tx_COUNTEN BIT(30)
#define NPCM7XX_Tx_ONESHOT 0x0
-#define NPCM7XX_Tx_OPER GENMASK(3, 27)
+#define NPCM7XX_Tx_OPER GENMASK(27, 3)
#define NPCM7XX_Tx_MIN_PRESCALE 0x1
#define NPCM7XX_Tx_TDR_MASK_BITS 24
#define NPCM7XX_Tx_MAX_CNT 0xFFFFFF

2019-07-15 10:02:55

by Avi Fishman

[permalink] [raw]
Subject: Re: [PATCH 02/12] clocksource/drivers/npcm: Fix misuse of GENMASK macro

Hi,
I noticed that this is totaly wrong, so I will fix here.
If you wan I will put a separate patch.

On Wed, Jul 10, 2019 at 8:04 AM Joe Perches <[email protected]> wrote:
>
> Arguments are supposed to be ordered high then low.
>
> Signed-off-by: Joe Perches <[email protected]>
> ---
> drivers/clocksource/timer-npcm7xx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/timer-npcm7xx.c b/drivers/clocksource/timer-npcm7xx.c
> index 7a9bb5532d99..8a30da7f083b 100644
> --- a/drivers/clocksource/timer-npcm7xx.c
> +++ b/drivers/clocksource/timer-npcm7xx.c
> @@ -32,7 +32,7 @@
> #define NPCM7XX_Tx_INTEN BIT(29)
> #define NPCM7XX_Tx_COUNTEN BIT(30)
> #define NPCM7XX_Tx_ONESHOT 0x0
> -#define NPCM7XX_Tx_OPER GENMASK(3, 27)
> +#define NPCM7XX_Tx_OPER GENMASK(27, 3)

It should be:
+#define NPCM7XX_Tx_OPER GENMASK(28, 27)
but I need to do another change.

> #define NPCM7XX_Tx_MIN_PRESCALE 0x1
> #define NPCM7XX_Tx_TDR_MASK_BITS 24
> #define NPCM7XX_Tx_MAX_CNT 0xFFFFFF
> --
> 2.15.0
>


--
Regards,
Avi