All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
To: Wim Van Sebroeck <wim@iguana.be>,
	Guenter Roeck <linux@roeck-us.net>,
	Wolfram Sang <wsa@the-dreams.de>
Cc: <linux-watchdog@vger.kernel.org>
Subject: [PATCH v5 09/10] watchdog: imx2_wdt: use preferred BIT macro instead of open coded values
Date: Wed, 31 Aug 2016 14:52:49 +0300	[thread overview]
Message-ID: <1472644370-16982-10-git-send-email-vladimir_zapolskiy@mentor.com> (raw)
In-Reply-To: <1472644370-16982-1-git-send-email-vladimir_zapolskiy@mentor.com>

This is a nonfunctional change, declare register bit values with BIT()
helper macro.

The issues are reported by checkpatch:

  CHECK: Prefer using the BIT macro
  #40: FILE: drivers/watchdog/imx2_wdt.c:40:
  +#define IMX2_WDT_WCR_WDA	(1 << 5)	/* -> External Reset WDOG_B */

etc.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
---
New change in the series, practically this trivial change is
independent on the previous ones, but it's worth to have it
for a cleaner version of v5 10/10 change.

 drivers/watchdog/imx2_wdt.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 62f346bb4348..d17643eb7683 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -37,18 +37,18 @@
 
 #define IMX2_WDT_WCR		0x00		/* Control Register */
 #define IMX2_WDT_WCR_WT		(0xFF << 8)	/* -> Watchdog Timeout Field */
-#define IMX2_WDT_WCR_WDA	(1 << 5)	/* -> External Reset WDOG_B */
-#define IMX2_WDT_WCR_SRS	(1 << 4)	/* -> Software Reset Signal */
-#define IMX2_WDT_WCR_WRE	(1 << 3)	/* -> WDOG Reset Enable */
-#define IMX2_WDT_WCR_WDE	(1 << 2)	/* -> Watchdog Enable */
-#define IMX2_WDT_WCR_WDZST	(1 << 0)	/* -> Watchdog timer Suspend */
+#define IMX2_WDT_WCR_WDA	BIT(5)		/* -> External Reset WDOG_B */
+#define IMX2_WDT_WCR_SRS	BIT(4)		/* -> Software Reset Signal */
+#define IMX2_WDT_WCR_WRE	BIT(3)		/* -> WDOG Reset Enable */
+#define IMX2_WDT_WCR_WDE	BIT(2)		/* -> Watchdog Enable */
+#define IMX2_WDT_WCR_WDZST	BIT(0)		/* -> Watchdog timer Suspend */
 
 #define IMX2_WDT_WSR		0x02		/* Service Register */
 #define IMX2_WDT_SEQ1		0x5555		/* -> service sequence 1 */
 #define IMX2_WDT_SEQ2		0xAAAA		/* -> service sequence 2 */
 
 #define IMX2_WDT_WRSR		0x04		/* Reset Status Register */
-#define IMX2_WDT_WRSR_TOUT	(1 << 1)	/* -> Reset due to Timeout */
+#define IMX2_WDT_WRSR_TOUT	BIT(1)		/* -> Reset due to Timeout */
 
 #define IMX2_WDT_WMCR		0x08		/* Misc Register */
 
-- 
2.8.1


  parent reply	other threads:[~2016-08-31 11:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31 11:52 [PATCH v5 00/10] watchdog: add watchdog pretimeout framework Vladimir Zapolskiy
2016-08-31 11:52 ` [PATCH v5 01/10] watchdog: add pretimeout support to the core Vladimir Zapolskiy
2016-08-31 11:52 ` [PATCH v5 02/10] fs: compat_ioctl: add pretimeout functions for watchdogs Vladimir Zapolskiy
2016-08-31 11:52 ` [PATCH v5 03/10] watchdog: add watchdog pretimeout governor framework Vladimir Zapolskiy
2016-08-31 11:52 ` [PATCH v5 04/10] watchdog: pretimeout: add panic pretimeout governor Vladimir Zapolskiy
2016-08-31 11:52 ` [PATCH v5 05/10] watchdog: pretimeout: add noop " Vladimir Zapolskiy
2016-08-31 11:52 ` [PATCH v5 06/10] watchdog: pretimeout: add option to select a pretimeout governor in runtime Vladimir Zapolskiy
2016-08-31 11:52 ` [PATCH v5 07/10] watchdog: pretimeout: add pretimeout_available_governors attribute Vladimir Zapolskiy
2016-08-31 11:52 ` [PATCH v5 08/10] watchdog: softdog: implement pretimeout support Vladimir Zapolskiy
2016-08-31 11:52 ` Vladimir Zapolskiy [this message]
2016-08-31 11:52 ` [PATCH v5 10/10] watchdog: imx2_wdt: add pretimeout function support Vladimir Zapolskiy
2016-09-05 16:49 ` [PATCH v5 00/10] watchdog: add watchdog pretimeout framework Wolfram Sang
2016-09-06 10:33   ` Vladimir Zapolskiy
2016-09-06 14:05     ` Wolfram Sang
2016-09-09  4:47     ` Guenter Roeck
2016-09-21 18:34       ` Wolfram Sang
2016-09-21 21:03         ` Guenter Roeck
2016-09-28  8:49 ` Wim Van Sebroeck
2016-09-28 11:34   ` Vladimir Zapolskiy
2016-10-04 13:29     ` Vladimir Zapolskiy
2016-10-07  7:24       ` Wim Van Sebroeck

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=1472644370-16982-10-git-send-email-vladimir_zapolskiy@mentor.com \
    --to=vladimir_zapolskiy@mentor.com \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=wim@iguana.be \
    --cc=wsa@the-dreams.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.