From: Srinivas Neeli <srinivas.neeli@xilinx.com>
To: <linux@roeck-us.net>, <shubhraj@xilinx.com>, <sgoud@xilinx.com>,
<michal.simek@xilinx.com>
Cc: <wim@linux-watchdog.org>, <linux-watchdog@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <git@xilinx.com>,
Srinivas Goud <srinivas.goud@xilinx.com>,
Srinivas Neeli <srinivas.neeli@xilinx.com>
Subject: [PATCH V2 2/5] watchdog: of_xilinx_wdt: Used BIT macro
Date: Mon, 29 Mar 2021 21:49:36 +0530 [thread overview]
Message-ID: <20210329161939.37680-3-srinivas.neeli@xilinx.com> (raw)
In-Reply-To: <20210329161939.37680-1-srinivas.neeli@xilinx.com>
From: Srinivas Goud <srinivas.goud@xilinx.com>
Used BIT macro instead of mask value.
Signed-off-by: Srinivas Goud <srinivas.goud@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
---
Changes in V2:
-Included bits.h header file.
---
drivers/watchdog/of_xilinx_wdt.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c
index 00549164b3d7..f76ec56859a4 100644
--- a/drivers/watchdog/of_xilinx_wdt.c
+++ b/drivers/watchdog/of_xilinx_wdt.c
@@ -6,6 +6,7 @@
* (C) Copyright 2011 (Alejandro Cabrera <aldaya@gmail.com>)
*/
+#include <linux/bits.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/module.h>
@@ -24,12 +25,12 @@
#define XWT_TBR_OFFSET 0x8 /* Timebase Register Offset */
/* Control/Status Register Masks */
-#define XWT_CSR0_WRS_MASK 0x00000008 /* Reset status */
-#define XWT_CSR0_WDS_MASK 0x00000004 /* Timer state */
-#define XWT_CSR0_EWDT1_MASK 0x00000002 /* Enable bit 1 */
+#define XWT_CSR0_WRS_MASK BIT(3) /* Reset status */
+#define XWT_CSR0_WDS_MASK BIT(2) /* Timer state */
+#define XWT_CSR0_EWDT1_MASK BIT(1) /* Enable bit 1 */
/* Control/Status Register 0/1 bits */
-#define XWT_CSRX_EWDT2_MASK 0x00000001 /* Enable bit 2 */
+#define XWT_CSRX_EWDT2_MASK BIT(0) /* Enable bit 2 */
/* SelfTest constants */
#define XWT_MAX_SELFTEST_LOOP_COUNT 0x00010000
--
2.9.1
next prev parent reply other threads:[~2021-03-29 16:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 16:19 [PATCH V2 0/5] watchdog: of_xilinx_wdt: Update on xilinx watchdog driver Srinivas Neeli
2021-03-29 16:19 ` [PATCH V2 1/5] watchdog: of_xilinx_wdt: Add comment to spinlock Srinivas Neeli
2021-03-29 16:19 ` Srinivas Neeli [this message]
2021-03-29 21:54 ` [PATCH V2 2/5] watchdog: of_xilinx_wdt: Used BIT macro Guenter Roeck
2021-03-29 16:19 ` [PATCH V2 3/5] watchdog: of_xilinx_wdt: Used dev_dbg() Srinivas Neeli
2021-03-29 21:54 ` Guenter Roeck
2021-03-29 16:19 ` [PATCH V2 4/5] watchdog: of_xilinx_wdt: Remove passing null pointer Srinivas Neeli
2021-03-29 16:19 ` [PATCH V2 5/5] watchdog: of_xilinx_wdt: Skip printing pointer value Srinivas Neeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210329161939.37680-3-srinivas.neeli@xilinx.com \
--to=srinivas.neeli@xilinx.com \
--cc=git@xilinx.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=michal.simek@xilinx.com \
--cc=sgoud@xilinx.com \
--cc=shubhraj@xilinx.com \
--cc=srinivas.goud@xilinx.com \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox