From: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
To: abbotti@mev.co.uk, hsweeten@visionengravers.com,
gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
ravishankarkm32@gmail.com
Subject: [PATCH v1 06/10] Staging: comedi: Prefer using the BIT macro issue in das16.c
Date: Mon, 6 Jun 2016 16:31:19 +0530 [thread overview]
Message-ID: <1465210883-14937-7-git-send-email-ravishankarkm32@gmail.com> (raw)
In-Reply-To: <1465210883-14937-1-git-send-email-ravishankarkm32@gmail.com>
This patch Replace all occurences of (1<<x) by BIT(x) in the file das16.c
to get rid of checkpatch.pl "CHECK" output "Prefer using the BIT macro"
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankarkm32@gmail.com>
---
drivers/staging/comedi/drivers/das16.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c
index fd8e0b7..69133e3 100644
--- a/drivers/staging/comedi/drivers/das16.c
+++ b/drivers/staging/comedi/drivers/das16.c
@@ -92,37 +92,37 @@
#define DAS16_AO_LSB_REG(x) ((x) ? 0x06 : 0x04)
#define DAS16_AO_MSB_REG(x) ((x) ? 0x07 : 0x05)
#define DAS16_STATUS_REG 0x08
-#define DAS16_STATUS_BUSY (1 << 7)
-#define DAS16_STATUS_UNIPOLAR (1 << 6)
-#define DAS16_STATUS_MUXBIT (1 << 5)
-#define DAS16_STATUS_INT (1 << 4)
+#define DAS16_STATUS_BUSY BIT(7)
+#define DAS16_STATUS_UNIPOLAR BIT(6)
+#define DAS16_STATUS_MUXBIT BIT(5)
+#define DAS16_STATUS_INT BIT(4)
#define DAS16_CTRL_REG 0x09
-#define DAS16_CTRL_INTE (1 << 7)
+#define DAS16_CTRL_INTE BIT(7)
#define DAS16_CTRL_IRQ(x) (((x) & 0x7) << 4)
-#define DAS16_CTRL_DMAE (1 << 2)
+#define DAS16_CTRL_DMAE BIT(2)
#define DAS16_CTRL_PACING_MASK (3 << 0)
#define DAS16_CTRL_INT_PACER (3 << 0)
#define DAS16_CTRL_EXT_PACER (2 << 0)
#define DAS16_CTRL_SOFT_PACER (0 << 0)
#define DAS16_PACER_REG 0x0a
#define DAS16_PACER_BURST_LEN(x) (((x) & 0xf) << 4)
-#define DAS16_PACER_CTR0 (1 << 1)
-#define DAS16_PACER_TRIG0 (1 << 0)
+#define DAS16_PACER_CTR0 BIT(1)
+#define DAS16_PACER_TRIG0 BIT(0)
#define DAS16_GAIN_REG 0x0b
#define DAS16_TIMER_BASE_REG 0x0c /* to 0x0f */
#define DAS1600_CONV_REG 0x404
-#define DAS1600_CONV_DISABLE (1 << 6)
+#define DAS1600_CONV_DISABLE BIT(6)
#define DAS1600_BURST_REG 0x405
-#define DAS1600_BURST_VAL (1 << 6)
+#define DAS1600_BURST_VAL BIT(6)
#define DAS1600_ENABLE_REG 0x406
-#define DAS1600_ENABLE_VAL (1 << 6)
+#define DAS1600_ENABLE_VAL BIT(6)
#define DAS1600_STATUS_REG 0x407
-#define DAS1600_STATUS_BME (1 << 6)
-#define DAS1600_STATUS_ME (1 << 5)
-#define DAS1600_STATUS_CD (1 << 4)
-#define DAS1600_STATUS_WS (1 << 1)
-#define DAS1600_STATUS_CLK_10MHZ (1 << 0)
+#define DAS1600_STATUS_BME BIT(6)
+#define DAS1600_STATUS_ME BIT(5)
+#define DAS1600_STATUS_CD BIT(4)
+#define DAS1600_STATUS_WS BIT(1)
+#define DAS1600_STATUS_CLK_10MHZ BIT(0)
static const struct comedi_lrange range_das1x01_bip = {
4, {
--
1.9.1
next prev parent reply other threads:[~2016-06-06 11:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 11:01 [PATCH v1 01/10] Staging: comedi: Use unsigned int instead of unsigned issue in pcmuio.c Ravishankar Karkala Mallikarjunayya
2016-06-06 11:01 ` [PATCH v1 02/10] Staging: comedi: fix bare use of unsigned issue in ni_65xx.c Ravishankar Karkala Mallikarjunayya
2016-06-08 10:18 ` Ian Abbott
2016-06-06 11:01 ` [PATCH v1 03/10] Staging: comedi: Indentation issue in mpc624.c Ravishankar Karkala Mallikarjunayya
2016-06-08 10:18 ` Ian Abbott
2016-06-06 11:01 ` [PATCH v1 04/10] Staging: comedi:Fix a warning issues in me_daq.c Ravishankar Karkala Mallikarjunayya
2016-06-08 10:19 ` Ian Abbott
2016-06-06 11:01 ` [PATCH v1 05/10] Staging: comedi: Fix comment issues in jr3_pci.c Ravishankar Karkala Mallikarjunayya
2016-06-08 10:19 ` Ian Abbott
2016-06-06 11:01 ` [PATCH v1 06/10] Staging: comedi: Prefer using the BIT macro issue in das16.c Ravishankar Karkala Mallikarjunayya
2016-06-08 10:20 ` Ian Abbott
2016-06-06 11:01 ` Ravishankar Karkala Mallikarjunayya [this message]
2016-06-06 11:01 ` [PATCH v1 07/10] Staging: comedi: fix BIT macro issue in das6402.c Ravishankar Karkala Mallikarjunayya
2016-06-08 10:20 ` Ian Abbott
2016-06-06 11:01 ` [PATCH v1 08/10] Staging: comedi: Prefer unsigned int instead of unsigned in comedi_bond.c Ravishankar Karkala Mallikarjunayya
2016-06-08 10:21 ` Ian Abbott
2016-06-06 11:01 ` [PATCH v1 09/10] Staging: comedi: Block comment issue fixed for das16m1.c Ravishankar Karkala Mallikarjunayya
2016-06-08 10:21 ` Ian Abbott
2016-06-06 11:01 ` [PATCH v1 10/10] Staging: comedi: Used unsigned int instead of unsigned issue in jr3_pci.c Ravishankar Karkala Mallikarjunayya
2016-06-08 10:21 ` Ian Abbott
2016-06-08 10:17 ` [PATCH v1 01/10] Staging: comedi: Use unsigned int instead of unsigned issue in pcmuio.c Ian Abbott
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=1465210883-14937-7-git-send-email-ravishankarkm32@gmail.com \
--to=ravishankarkm32@gmail.com \
--cc=abbotti@mev.co.uk \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hsweeten@visionengravers.com \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome