All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] comedi: pcmmio: Fix coding style - use BIT macro
@ 2015-11-14 13:24 Ranjith Thangavel
  2015-11-18 15:51 ` Ian Abbott
  0 siblings, 1 reply; 7+ messages in thread
From: Ranjith Thangavel @ 2015-11-14 13:24 UTC (permalink / raw)
  To: gregkh; +Cc: abbotti, hsweeten, devel, linux-kernel, ranjithece24

BIT macro is used for defining BIT location instead of
shifting operator - coding style issue

Signed-off-by: Ranjith Thangavel <ranjithece24@gmail.com>
---
 drivers/staging/comedi/drivers/pcmmio.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c
index f7ec224..f2aedc21 100644
--- a/drivers/staging/comedi/drivers/pcmmio.c
+++ b/drivers/staging/comedi/drivers/pcmmio.c
@@ -84,20 +84,20 @@
 #define PCMMIO_AI_LSB_REG			0x00
 #define PCMMIO_AI_MSB_REG			0x01
 #define PCMMIO_AI_CMD_REG			0x02
-#define PCMMIO_AI_CMD_SE				BIT(7)
+#define PCMMIO_AI_CMD_SE			BIT(7)
 #define PCMMIO_AI_CMD_ODD_CHAN			BIT(6)
 #define PCMMIO_AI_CMD_CHAN_SEL(x)		(((x) & 0x3) << 4)
 #define PCMMIO_AI_CMD_RANGE(x)			(((x) & 0x3) << 2)
-#define PCMMIO_RESOURCE_REG				0x02
+#define PCMMIO_RESOURCE_REG			0x02
 #define PCMMIO_RESOURCE_IRQ(x)			(((x) & 0xf) << 0)
 #define PCMMIO_AI_STATUS_REG			0x03
 #define PCMMIO_AI_STATUS_DATA_READY		BIT(7)
-#define PCMMIO_AI_STATUS_DATA_DMA_PEND	BIT(6)
-#define PCMMIO_AI_STATUS_CMD_DMA_PEND	BIT(5)
+#define PCMMIO_AI_STATUS_DATA_DMA_PEND		BIT(6)
+#define PCMMIO_AI_STATUS_CMD_DMA_PEND		BIT(5)
 #define PCMMIO_AI_STATUS_IRQ_PEND		BIT(4)
-#define PCMMIO_AI_STATUS_DATA_DRQ_ENA	BIT(2)
+#define PCMMIO_AI_STATUS_DATA_DRQ_ENA		BIT(2)
 #define PCMMIO_AI_STATUS_REG_SEL		BIT(3)
-#define PCMMIO_AI_STATUS_CMD_DRQ_ENA	BIT(1)
+#define PCMMIO_AI_STATUS_CMD_DRQ_ENA		BIT(1)
 #define PCMMIO_AI_STATUS_IRQ_ENA		BIT(0)
 #define PCMMIO_AI_RES_ENA_REG			0x03
 #define PCMMIO_AI_RES_ENA_CMD_REG_ACCESS	0
@@ -126,12 +126,12 @@
 #define PCMMIO_AO_CMD_CHAN_SEL_ALL		(0x0f << 0)
 #define PCMMIO_AO_STATUS_REG			0x0b
 #define PCMMIO_AO_STATUS_DATA_READY		BIT(7)
-#define PCMMIO_AO_STATUS_DATA_DMA_PEND	BIT(6)
-#define PCMMIO_AO_STATUS_CMD_DMA_PEND	BIT(5)
+#define PCMMIO_AO_STATUS_DATA_DMA_PEND		BIT(6)
+#define PCMMIO_AO_STATUS_CMD_DMA_PEND		BIT(5)
 #define PCMMIO_AO_STATUS_IRQ_PEND		BIT(4)
-#define PCMMIO_AO_STATUS_DATA_DRQ_ENA	BIT(2)
+#define PCMMIO_AO_STATUS_DATA_DRQ_ENA		BIT(2)
 #define PCMMIO_AO_STATUS_REG_SEL		BIT(3)
-#define PCMMIO_AO_STATUS_CMD_DRQ_ENA	BIT(1)
+#define PCMMIO_AO_STATUS_CMD_DRQ_ENA		BIT(1)
 #define PCMMIO_AO_STATUS_IRQ_ENA		BIT(0)
 #define PCMMIO_AO_RESOURCE_ENA_REG		0x0b
 #define PCMMIO_AO_2ND_DAC_OFFSET		0x04
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] comedi: pcmmio: Fix coding style - use BIT macro
  2015-11-14 13:24 [PATCH] comedi: pcmmio: Fix coding style - use BIT macro Ranjith Thangavel
@ 2015-11-18 15:51 ` Ian Abbott
  0 siblings, 0 replies; 7+ messages in thread
From: Ian Abbott @ 2015-11-18 15:51 UTC (permalink / raw)
  To: Ranjith Thangavel, gregkh; +Cc: hsweeten, devel, linux-kernel

On 14/11/15 13:24, Ranjith Thangavel wrote:
> BIT macro is used for defining BIT location instead of
> shifting operator - coding style issue
>
> Signed-off-by: Ranjith Thangavel <ranjithece24@gmail.com>
> ---
>   drivers/staging/comedi/drivers/pcmmio.c |   20 ++++++++++----------
>   1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c
> index f7ec224..f2aedc21 100644
> --- a/drivers/staging/comedi/drivers/pcmmio.c
> +++ b/drivers/staging/comedi/drivers/pcmmio.c
> @@ -84,20 +84,20 @@
>   #define PCMMIO_AI_LSB_REG			0x00
>   #define PCMMIO_AI_MSB_REG			0x01
>   #define PCMMIO_AI_CMD_REG			0x02
> -#define PCMMIO_AI_CMD_SE				BIT(7)
> +#define PCMMIO_AI_CMD_SE			BIT(7)
>   #define PCMMIO_AI_CMD_ODD_CHAN			BIT(6)
>   #define PCMMIO_AI_CMD_CHAN_SEL(x)		(((x) & 0x3) << 4)
>   #define PCMMIO_AI_CMD_RANGE(x)			(((x) & 0x3) << 2)
> -#define PCMMIO_RESOURCE_REG				0x02
> +#define PCMMIO_RESOURCE_REG			0x02
>   #define PCMMIO_RESOURCE_IRQ(x)			(((x) & 0xf) << 0)
>   #define PCMMIO_AI_STATUS_REG			0x03
>   #define PCMMIO_AI_STATUS_DATA_READY		BIT(7)
> -#define PCMMIO_AI_STATUS_DATA_DMA_PEND	BIT(6)
> -#define PCMMIO_AI_STATUS_CMD_DMA_PEND	BIT(5)
> +#define PCMMIO_AI_STATUS_DATA_DMA_PEND		BIT(6)
> +#define PCMMIO_AI_STATUS_CMD_DMA_PEND		BIT(5)
>   #define PCMMIO_AI_STATUS_IRQ_PEND		BIT(4)
> -#define PCMMIO_AI_STATUS_DATA_DRQ_ENA	BIT(2)
> +#define PCMMIO_AI_STATUS_DATA_DRQ_ENA		BIT(2)
>   #define PCMMIO_AI_STATUS_REG_SEL		BIT(3)
> -#define PCMMIO_AI_STATUS_CMD_DRQ_ENA	BIT(1)
> +#define PCMMIO_AI_STATUS_CMD_DRQ_ENA		BIT(1)
>   #define PCMMIO_AI_STATUS_IRQ_ENA		BIT(0)
>   #define PCMMIO_AI_RES_ENA_REG			0x03
>   #define PCMMIO_AI_RES_ENA_CMD_REG_ACCESS	0
> @@ -126,12 +126,12 @@
>   #define PCMMIO_AO_CMD_CHAN_SEL_ALL		(0x0f << 0)
>   #define PCMMIO_AO_STATUS_REG			0x0b
>   #define PCMMIO_AO_STATUS_DATA_READY		BIT(7)
> -#define PCMMIO_AO_STATUS_DATA_DMA_PEND	BIT(6)
> -#define PCMMIO_AO_STATUS_CMD_DMA_PEND	BIT(5)
> +#define PCMMIO_AO_STATUS_DATA_DMA_PEND		BIT(6)
> +#define PCMMIO_AO_STATUS_CMD_DMA_PEND		BIT(5)
>   #define PCMMIO_AO_STATUS_IRQ_PEND		BIT(4)
> -#define PCMMIO_AO_STATUS_DATA_DRQ_ENA	BIT(2)
> +#define PCMMIO_AO_STATUS_DATA_DRQ_ENA		BIT(2)
>   #define PCMMIO_AO_STATUS_REG_SEL		BIT(3)
> -#define PCMMIO_AO_STATUS_CMD_DRQ_ENA	BIT(1)
> +#define PCMMIO_AO_STATUS_CMD_DRQ_ENA		BIT(1)
>   #define PCMMIO_AO_STATUS_IRQ_ENA		BIT(0)
>   #define PCMMIO_AO_RESOURCE_ENA_REG		0x0b
>   #define PCMMIO_AO_2ND_DAC_OFFSET		0x04
>

This patch appears to be fixing the whitespace issues introduced by your 
previous patch of the same name, but your previous patch hasn't been 
applied because of the whitespace issues.

What you need to do in this case is merge this patch with your previous 
of the same name, for example by using an interactive git rebase with 
this patch marked as a 'fixup' patch.  Then submit the combined single 
patch using the '[PATCH v2]' tag in the email.

If that's a bit daunting, it might be easier for you to recreate the 
patch from scratch!

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] comedi: pcmmio: Fix coding style - use BIT macro
  2015-11-11 13:45 ` Ranjith T
@ 2015-11-11 15:34   ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2015-11-11 15:34 UTC (permalink / raw)
  To: Ranjith T; +Cc: devel, Ian Abbott, linux-kernel


A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Wed, Nov 11, 2015 at 07:15:28PM +0530, Ranjith T wrote:
> Is this patch is fine?..

You sent it a few days ago, please wait at least 2 weeks before worrying
if a patch is accepted or not, we all are very busy.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] comedi: pcmmio: Fix coding style - use BIT macro
  2015-11-09 17:44 Ranjith T
@ 2015-11-11 13:45 ` Ranjith T
  2015-11-11 15:34   ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Ranjith T @ 2015-11-11 13:45 UTC (permalink / raw)
  To: gregkh; +Cc: Ian Abbott, hsweeten, devel, linux-kernel, Ranjith T

Is this patch is fine?..

Thanks,
Ranjith T.

On Mon, Nov 9, 2015 at 11:14 PM, Ranjith T <ranjithece24@gmail.com> wrote:
> BIT macro is used for defining BIT location instead of
> shifting operator - coding style issue
>
> Signed-off-by: Ranjith T <ranjithece24@gmail.com>
> ---
>  drivers/staging/comedi/drivers/pcmmio.c |   44 +++++++++++++++----------------
>  1 file changed, 22 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c
> index 10472e6..f7ec224 100644
> --- a/drivers/staging/comedi/drivers/pcmmio.c
> +++ b/drivers/staging/comedi/drivers/pcmmio.c
> @@ -84,25 +84,25 @@
>  #define PCMMIO_AI_LSB_REG                      0x00
>  #define PCMMIO_AI_MSB_REG                      0x01
>  #define PCMMIO_AI_CMD_REG                      0x02
> -#define PCMMIO_AI_CMD_SE                       (1 << 7)
> -#define PCMMIO_AI_CMD_ODD_CHAN                 (1 << 6)
> +#define PCMMIO_AI_CMD_SE                               BIT(7)
> +#define PCMMIO_AI_CMD_ODD_CHAN                 BIT(6)
>  #define PCMMIO_AI_CMD_CHAN_SEL(x)              (((x) & 0x3) << 4)
>  #define PCMMIO_AI_CMD_RANGE(x)                 (((x) & 0x3) << 2)
> -#define PCMMIO_RESOURCE_REG                    0x02
> +#define PCMMIO_RESOURCE_REG                            0x02
>  #define PCMMIO_RESOURCE_IRQ(x)                 (((x) & 0xf) << 0)
>  #define PCMMIO_AI_STATUS_REG                   0x03
> -#define PCMMIO_AI_STATUS_DATA_READY            (1 << 7)
> -#define PCMMIO_AI_STATUS_DATA_DMA_PEND         (1 << 6)
> -#define PCMMIO_AI_STATUS_CMD_DMA_PEND          (1 << 5)
> -#define PCMMIO_AI_STATUS_IRQ_PEND              (1 << 4)
> -#define PCMMIO_AI_STATUS_DATA_DRQ_ENA          (1 << 2)
> -#define PCMMIO_AI_STATUS_REG_SEL               (1 << 3)
> -#define PCMMIO_AI_STATUS_CMD_DRQ_ENA           (1 << 1)
> -#define PCMMIO_AI_STATUS_IRQ_ENA               (1 << 0)
> +#define PCMMIO_AI_STATUS_DATA_READY            BIT(7)
> +#define PCMMIO_AI_STATUS_DATA_DMA_PEND BIT(6)
> +#define PCMMIO_AI_STATUS_CMD_DMA_PEND  BIT(5)
> +#define PCMMIO_AI_STATUS_IRQ_PEND              BIT(4)
> +#define PCMMIO_AI_STATUS_DATA_DRQ_ENA  BIT(2)
> +#define PCMMIO_AI_STATUS_REG_SEL               BIT(3)
> +#define PCMMIO_AI_STATUS_CMD_DRQ_ENA   BIT(1)
> +#define PCMMIO_AI_STATUS_IRQ_ENA               BIT(0)
>  #define PCMMIO_AI_RES_ENA_REG                  0x03
> -#define PCMMIO_AI_RES_ENA_CMD_REG_ACCESS       (0 << 3)
> -#define PCMMIO_AI_RES_ENA_AI_RES_ACCESS                (1 << 3)
> -#define PCMMIO_AI_RES_ENA_DIO_RES_ACCESS       (1 << 4)
> +#define PCMMIO_AI_RES_ENA_CMD_REG_ACCESS       0
> +#define PCMMIO_AI_RES_ENA_AI_RES_ACCESS                BIT(3)
> +#define PCMMIO_AI_RES_ENA_DIO_RES_ACCESS       BIT(4)
>  #define PCMMIO_AI_2ND_ADC_OFFSET               0x04
>
>  #define PCMMIO_AO_LSB_REG                      0x08
> @@ -125,14 +125,14 @@
>  #define PCMMIO_AO_CMD_CHAN_SEL(x)              (((x) & 0x03) << 1)
>  #define PCMMIO_AO_CMD_CHAN_SEL_ALL             (0x0f << 0)
>  #define PCMMIO_AO_STATUS_REG                   0x0b
> -#define PCMMIO_AO_STATUS_DATA_READY            (1 << 7)
> -#define PCMMIO_AO_STATUS_DATA_DMA_PEND         (1 << 6)
> -#define PCMMIO_AO_STATUS_CMD_DMA_PEND          (1 << 5)
> -#define PCMMIO_AO_STATUS_IRQ_PEND              (1 << 4)
> -#define PCMMIO_AO_STATUS_DATA_DRQ_ENA          (1 << 2)
> -#define PCMMIO_AO_STATUS_REG_SEL               (1 << 3)
> -#define PCMMIO_AO_STATUS_CMD_DRQ_ENA           (1 << 1)
> -#define PCMMIO_AO_STATUS_IRQ_ENA               (1 << 0)
> +#define PCMMIO_AO_STATUS_DATA_READY            BIT(7)
> +#define PCMMIO_AO_STATUS_DATA_DMA_PEND BIT(6)
> +#define PCMMIO_AO_STATUS_CMD_DMA_PEND  BIT(5)
> +#define PCMMIO_AO_STATUS_IRQ_PEND              BIT(4)
> +#define PCMMIO_AO_STATUS_DATA_DRQ_ENA  BIT(2)
> +#define PCMMIO_AO_STATUS_REG_SEL               BIT(3)
> +#define PCMMIO_AO_STATUS_CMD_DRQ_ENA   BIT(1)
> +#define PCMMIO_AO_STATUS_IRQ_ENA               BIT(0)
>  #define PCMMIO_AO_RESOURCE_ENA_REG             0x0b
>  #define PCMMIO_AO_2ND_DAC_OFFSET               0x04
>
> --
> 1.7.10.4
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] comedi: pcmmio: Fix coding style - use BIT macro
@ 2015-11-09 17:44 Ranjith T
  2015-11-11 13:45 ` Ranjith T
  0 siblings, 1 reply; 7+ messages in thread
From: Ranjith T @ 2015-11-09 17:44 UTC (permalink / raw)
  To: gregkh; +Cc: abbotti, hsweeten, devel, linux-kernel, ranjithece24

BIT macro is used for defining BIT location instead of
shifting operator - coding style issue

Signed-off-by: Ranjith T <ranjithece24@gmail.com>
---
 drivers/staging/comedi/drivers/pcmmio.c |   44 +++++++++++++++----------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c
index 10472e6..f7ec224 100644
--- a/drivers/staging/comedi/drivers/pcmmio.c
+++ b/drivers/staging/comedi/drivers/pcmmio.c
@@ -84,25 +84,25 @@
 #define PCMMIO_AI_LSB_REG			0x00
 #define PCMMIO_AI_MSB_REG			0x01
 #define PCMMIO_AI_CMD_REG			0x02
-#define PCMMIO_AI_CMD_SE			(1 << 7)
-#define PCMMIO_AI_CMD_ODD_CHAN			(1 << 6)
+#define PCMMIO_AI_CMD_SE				BIT(7)
+#define PCMMIO_AI_CMD_ODD_CHAN			BIT(6)
 #define PCMMIO_AI_CMD_CHAN_SEL(x)		(((x) & 0x3) << 4)
 #define PCMMIO_AI_CMD_RANGE(x)			(((x) & 0x3) << 2)
-#define PCMMIO_RESOURCE_REG			0x02
+#define PCMMIO_RESOURCE_REG				0x02
 #define PCMMIO_RESOURCE_IRQ(x)			(((x) & 0xf) << 0)
 #define PCMMIO_AI_STATUS_REG			0x03
-#define PCMMIO_AI_STATUS_DATA_READY		(1 << 7)
-#define PCMMIO_AI_STATUS_DATA_DMA_PEND		(1 << 6)
-#define PCMMIO_AI_STATUS_CMD_DMA_PEND		(1 << 5)
-#define PCMMIO_AI_STATUS_IRQ_PEND		(1 << 4)
-#define PCMMIO_AI_STATUS_DATA_DRQ_ENA		(1 << 2)
-#define PCMMIO_AI_STATUS_REG_SEL		(1 << 3)
-#define PCMMIO_AI_STATUS_CMD_DRQ_ENA		(1 << 1)
-#define PCMMIO_AI_STATUS_IRQ_ENA		(1 << 0)
+#define PCMMIO_AI_STATUS_DATA_READY		BIT(7)
+#define PCMMIO_AI_STATUS_DATA_DMA_PEND	BIT(6)
+#define PCMMIO_AI_STATUS_CMD_DMA_PEND	BIT(5)
+#define PCMMIO_AI_STATUS_IRQ_PEND		BIT(4)
+#define PCMMIO_AI_STATUS_DATA_DRQ_ENA	BIT(2)
+#define PCMMIO_AI_STATUS_REG_SEL		BIT(3)
+#define PCMMIO_AI_STATUS_CMD_DRQ_ENA	BIT(1)
+#define PCMMIO_AI_STATUS_IRQ_ENA		BIT(0)
 #define PCMMIO_AI_RES_ENA_REG			0x03
-#define PCMMIO_AI_RES_ENA_CMD_REG_ACCESS	(0 << 3)
-#define PCMMIO_AI_RES_ENA_AI_RES_ACCESS		(1 << 3)
-#define PCMMIO_AI_RES_ENA_DIO_RES_ACCESS	(1 << 4)
+#define PCMMIO_AI_RES_ENA_CMD_REG_ACCESS	0
+#define PCMMIO_AI_RES_ENA_AI_RES_ACCESS		BIT(3)
+#define PCMMIO_AI_RES_ENA_DIO_RES_ACCESS	BIT(4)
 #define PCMMIO_AI_2ND_ADC_OFFSET		0x04
 
 #define PCMMIO_AO_LSB_REG			0x08
@@ -125,14 +125,14 @@
 #define PCMMIO_AO_CMD_CHAN_SEL(x)		(((x) & 0x03) << 1)
 #define PCMMIO_AO_CMD_CHAN_SEL_ALL		(0x0f << 0)
 #define PCMMIO_AO_STATUS_REG			0x0b
-#define PCMMIO_AO_STATUS_DATA_READY		(1 << 7)
-#define PCMMIO_AO_STATUS_DATA_DMA_PEND		(1 << 6)
-#define PCMMIO_AO_STATUS_CMD_DMA_PEND		(1 << 5)
-#define PCMMIO_AO_STATUS_IRQ_PEND		(1 << 4)
-#define PCMMIO_AO_STATUS_DATA_DRQ_ENA		(1 << 2)
-#define PCMMIO_AO_STATUS_REG_SEL		(1 << 3)
-#define PCMMIO_AO_STATUS_CMD_DRQ_ENA		(1 << 1)
-#define PCMMIO_AO_STATUS_IRQ_ENA		(1 << 0)
+#define PCMMIO_AO_STATUS_DATA_READY		BIT(7)
+#define PCMMIO_AO_STATUS_DATA_DMA_PEND	BIT(6)
+#define PCMMIO_AO_STATUS_CMD_DMA_PEND	BIT(5)
+#define PCMMIO_AO_STATUS_IRQ_PEND		BIT(4)
+#define PCMMIO_AO_STATUS_DATA_DRQ_ENA	BIT(2)
+#define PCMMIO_AO_STATUS_REG_SEL		BIT(3)
+#define PCMMIO_AO_STATUS_CMD_DRQ_ENA	BIT(1)
+#define PCMMIO_AO_STATUS_IRQ_ENA		BIT(0)
 #define PCMMIO_AO_RESOURCE_ENA_REG		0x0b
 #define PCMMIO_AO_2ND_DAC_OFFSET		0x04
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* RE: [PATCH] comedi: pcmmio: Fix coding style - use BIT macro
  2015-11-09 15:09 Ranjith
@ 2015-11-09 16:56 ` Hartley Sweeten
  0 siblings, 0 replies; 7+ messages in thread
From: Hartley Sweeten @ 2015-11-09 16:56 UTC (permalink / raw)
  To: Ranjith, gregkh; +Cc: abbotti, devel, linux-kernel

On Monday, November 09, 2015 8:09 AM, Ranjith wrote:
> BIT macro is used for defining BIT location instead of
> shifting operator - coding style issue
>
> Signed-off-by: Ranjith <ranjithece24@gmail.com>
> ---
>  drivers/staging/comedi/drivers/pcmmio.c |   44 +++++++++++++++----------------
>  1 file changed, 22 insertions(+), 22 deletions(-)
>

Hello,

Again, no problems with the patch but your sign-off needs to include your
full legal name.

Regards,
Hartley


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] comedi: pcmmio: Fix coding style - use BIT macro
@ 2015-11-09 15:09 Ranjith
  2015-11-09 16:56 ` Hartley Sweeten
  0 siblings, 1 reply; 7+ messages in thread
From: Ranjith @ 2015-11-09 15:09 UTC (permalink / raw)
  To: gregkh; +Cc: abbotti, hsweeten, devel, linux-kernel, ranjithece24

BIT macro is used for defining BIT location instead of
shifting operator - coding style issue

Signed-off-by: Ranjith <ranjithece24@gmail.com>
---
 drivers/staging/comedi/drivers/pcmmio.c |   44 +++++++++++++++----------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c
index 10472e6..f7ec224 100644
--- a/drivers/staging/comedi/drivers/pcmmio.c
+++ b/drivers/staging/comedi/drivers/pcmmio.c
@@ -84,25 +84,25 @@
 #define PCMMIO_AI_LSB_REG			0x00
 #define PCMMIO_AI_MSB_REG			0x01
 #define PCMMIO_AI_CMD_REG			0x02
-#define PCMMIO_AI_CMD_SE			(1 << 7)
-#define PCMMIO_AI_CMD_ODD_CHAN			(1 << 6)
+#define PCMMIO_AI_CMD_SE				BIT(7)
+#define PCMMIO_AI_CMD_ODD_CHAN			BIT(6)
 #define PCMMIO_AI_CMD_CHAN_SEL(x)		(((x) & 0x3) << 4)
 #define PCMMIO_AI_CMD_RANGE(x)			(((x) & 0x3) << 2)
-#define PCMMIO_RESOURCE_REG			0x02
+#define PCMMIO_RESOURCE_REG				0x02
 #define PCMMIO_RESOURCE_IRQ(x)			(((x) & 0xf) << 0)
 #define PCMMIO_AI_STATUS_REG			0x03
-#define PCMMIO_AI_STATUS_DATA_READY		(1 << 7)
-#define PCMMIO_AI_STATUS_DATA_DMA_PEND		(1 << 6)
-#define PCMMIO_AI_STATUS_CMD_DMA_PEND		(1 << 5)
-#define PCMMIO_AI_STATUS_IRQ_PEND		(1 << 4)
-#define PCMMIO_AI_STATUS_DATA_DRQ_ENA		(1 << 2)
-#define PCMMIO_AI_STATUS_REG_SEL		(1 << 3)
-#define PCMMIO_AI_STATUS_CMD_DRQ_ENA		(1 << 1)
-#define PCMMIO_AI_STATUS_IRQ_ENA		(1 << 0)
+#define PCMMIO_AI_STATUS_DATA_READY		BIT(7)
+#define PCMMIO_AI_STATUS_DATA_DMA_PEND	BIT(6)
+#define PCMMIO_AI_STATUS_CMD_DMA_PEND	BIT(5)
+#define PCMMIO_AI_STATUS_IRQ_PEND		BIT(4)
+#define PCMMIO_AI_STATUS_DATA_DRQ_ENA	BIT(2)
+#define PCMMIO_AI_STATUS_REG_SEL		BIT(3)
+#define PCMMIO_AI_STATUS_CMD_DRQ_ENA	BIT(1)
+#define PCMMIO_AI_STATUS_IRQ_ENA		BIT(0)
 #define PCMMIO_AI_RES_ENA_REG			0x03
-#define PCMMIO_AI_RES_ENA_CMD_REG_ACCESS	(0 << 3)
-#define PCMMIO_AI_RES_ENA_AI_RES_ACCESS		(1 << 3)
-#define PCMMIO_AI_RES_ENA_DIO_RES_ACCESS	(1 << 4)
+#define PCMMIO_AI_RES_ENA_CMD_REG_ACCESS	0
+#define PCMMIO_AI_RES_ENA_AI_RES_ACCESS		BIT(3)
+#define PCMMIO_AI_RES_ENA_DIO_RES_ACCESS	BIT(4)
 #define PCMMIO_AI_2ND_ADC_OFFSET		0x04
 
 #define PCMMIO_AO_LSB_REG			0x08
@@ -125,14 +125,14 @@
 #define PCMMIO_AO_CMD_CHAN_SEL(x)		(((x) & 0x03) << 1)
 #define PCMMIO_AO_CMD_CHAN_SEL_ALL		(0x0f << 0)
 #define PCMMIO_AO_STATUS_REG			0x0b
-#define PCMMIO_AO_STATUS_DATA_READY		(1 << 7)
-#define PCMMIO_AO_STATUS_DATA_DMA_PEND		(1 << 6)
-#define PCMMIO_AO_STATUS_CMD_DMA_PEND		(1 << 5)
-#define PCMMIO_AO_STATUS_IRQ_PEND		(1 << 4)
-#define PCMMIO_AO_STATUS_DATA_DRQ_ENA		(1 << 2)
-#define PCMMIO_AO_STATUS_REG_SEL		(1 << 3)
-#define PCMMIO_AO_STATUS_CMD_DRQ_ENA		(1 << 1)
-#define PCMMIO_AO_STATUS_IRQ_ENA		(1 << 0)
+#define PCMMIO_AO_STATUS_DATA_READY		BIT(7)
+#define PCMMIO_AO_STATUS_DATA_DMA_PEND	BIT(6)
+#define PCMMIO_AO_STATUS_CMD_DMA_PEND	BIT(5)
+#define PCMMIO_AO_STATUS_IRQ_PEND		BIT(4)
+#define PCMMIO_AO_STATUS_DATA_DRQ_ENA	BIT(2)
+#define PCMMIO_AO_STATUS_REG_SEL		BIT(3)
+#define PCMMIO_AO_STATUS_CMD_DRQ_ENA	BIT(1)
+#define PCMMIO_AO_STATUS_IRQ_ENA		BIT(0)
 #define PCMMIO_AO_RESOURCE_ENA_REG		0x0b
 #define PCMMIO_AO_2ND_DAC_OFFSET		0x04
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-18 15:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-14 13:24 [PATCH] comedi: pcmmio: Fix coding style - use BIT macro Ranjith Thangavel
2015-11-18 15:51 ` Ian Abbott
  -- strict thread matches above, loose matches on Subject: below --
2015-11-09 17:44 Ranjith T
2015-11-11 13:45 ` Ranjith T
2015-11-11 15:34   ` Greg KH
2015-11-09 15:09 Ranjith
2015-11-09 16:56 ` Hartley Sweeten

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.