public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: iio: Remove unneeded parentheses.
@ 2017-03-29 16:05 Arushi Singhal
  2017-03-29 16:27 ` Jonathan Cameron
  2017-03-29 20:37 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 2 replies; 3+ messages in thread
From: Arushi Singhal @ 2017-03-29 16:05 UTC (permalink / raw)
  To: lars
  Cc: outreachy-kernel, Michael Hennerich, Jonathan Cameron,
	Hartmut Knaack, Peter Meerwald-Stadler, Greg Kroah-Hartman,
	linux-iio, devel, linux-kernel

Remove the extra parenthesis remove the checkpatch issue.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
changes in v2
 -done the changes according to the current tree

 drivers/staging/iio/cdc/ad7746.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
index c2c8aa5585e4..7fa9913386f5 100644
--- a/drivers/staging/iio/cdc/ad7746.c
+++ b/drivers/staging/iio/cdc/ad7746.c
@@ -45,10 +45,10 @@
 #define AD7746_STATUS_RDYCAP		BIT(0)
 
 /* Capacitive Channel Setup Register Bit Designations (AD7746_REG_CAP_SETUP) */
-#define AD7746_CAPSETUP_CAPEN		(1 << 7)
-#define AD7746_CAPSETUP_CIN2		(1 << 6) /* AD7746 only */
-#define AD7746_CAPSETUP_CAPDIFF		(1 << 5)
-#define AD7746_CAPSETUP_CACHOP		(1 << 0)
+#define AD7746_CAPSETUP_CAPEN		BIT(7)
+#define AD7746_CAPSETUP_CIN2		BIT(6) /* AD7746 only */
+#define AD7746_CAPSETUP_CAPDIFF		BIT(5)
+#define AD7746_CAPSETUP_CACHOP		BIT(0)
 
 /* Voltage/Temperature Setup Register Bit Designations (AD7746_REG_VT_SETUP) */
 #define AD7746_VTSETUP_VTEN		(1 << 7)
@@ -56,9 +56,9 @@
 #define AD7746_VTSETUP_VTMD_EXT_TEMP	(1 << 5)
 #define AD7746_VTSETUP_VTMD_VDD_MON	(2 << 5)
 #define AD7746_VTSETUP_VTMD_EXT_VIN	(3 << 5)
-#define AD7746_VTSETUP_EXTREF		(1 << 4)
-#define AD7746_VTSETUP_VTSHORT		(1 << 1)
-#define AD7746_VTSETUP_VTCHOP		(1 << 0)
+#define AD7746_VTSETUP_EXTREF		BIT(4)
+#define AD7746_VTSETUP_VTSHORT		BIT(1)
+#define AD7746_VTSETUP_VTCHOP		BIT(0)
 
 /* Excitation Setup Register Bit Designations (AD7746_REG_EXC_SETUP) */
 #define AD7746_EXCSETUP_CLKCTRL		BIT(7)
@@ -82,7 +82,7 @@
 #define AD7746_CONF_MODE_GAIN_CAL	(6 << 0)
 
 /* CAPDAC Register Bit Designations (AD7746_REG_CAPDACx) */
-#define AD7746_CAPDAC_DACEN		(1 << 7)
+#define AD7746_CAPDAC_DACEN		BIT(7)
 #define AD7746_CAPDAC_DACP(x)		((x) & 0x7F)
 
 /*
-- 
2.11.0

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

* Re: [PATCH v2] staging: iio: Remove unneeded parentheses.
  2017-03-29 16:05 [PATCH v2] staging: iio: Remove unneeded parentheses Arushi Singhal
@ 2017-03-29 16:27 ` Jonathan Cameron
  2017-03-29 20:37 ` [Outreachy kernel] " Julia Lawall
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2017-03-29 16:27 UTC (permalink / raw)
  To: Arushi Singhal, lars
  Cc: outreachy-kernel, Michael Hennerich, Jonathan Cameron,
	Hartmut Knaack, Peter Meerwald-Stadler, Greg Kroah-Hartman,
	linux-iio, devel, linux-kernel



On 29 March 2017 17:05:51 BST, Arushi Singhal <arushisinghal19971997@gmail.com> wrote:
>Remove the extra parenthesis remove the checkpatch issue.
>
>Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>

Patch doesn't need resending as already applied.
If it did the description is now incorrect!
>---
>changes in v2
> -done the changes according to the current tree
>
> drivers/staging/iio/cdc/ad7746.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
>diff --git a/drivers/staging/iio/cdc/ad7746.c
>b/drivers/staging/iio/cdc/ad7746.c
>index c2c8aa5585e4..7fa9913386f5 100644
>--- a/drivers/staging/iio/cdc/ad7746.c
>+++ b/drivers/staging/iio/cdc/ad7746.c
>@@ -45,10 +45,10 @@
> #define AD7746_STATUS_RDYCAP		BIT(0)
> 
>/* Capacitive Channel Setup Register Bit Designations
>(AD7746_REG_CAP_SETUP) */
>-#define AD7746_CAPSETUP_CAPEN		(1 << 7)
>-#define AD7746_CAPSETUP_CIN2		(1 << 6) /* AD7746 only */
>-#define AD7746_CAPSETUP_CAPDIFF		(1 << 5)
>-#define AD7746_CAPSETUP_CACHOP		(1 << 0)
>+#define AD7746_CAPSETUP_CAPEN		BIT(7)
>+#define AD7746_CAPSETUP_CIN2		BIT(6) /* AD7746 only */
>+#define AD7746_CAPSETUP_CAPDIFF		BIT(5)
>+#define AD7746_CAPSETUP_CACHOP		BIT(0)
> 
>/* Voltage/Temperature Setup Register Bit Designations
>(AD7746_REG_VT_SETUP) */
> #define AD7746_VTSETUP_VTEN		(1 << 7)
>@@ -56,9 +56,9 @@
> #define AD7746_VTSETUP_VTMD_EXT_TEMP	(1 << 5)
> #define AD7746_VTSETUP_VTMD_VDD_MON	(2 << 5)
> #define AD7746_VTSETUP_VTMD_EXT_VIN	(3 << 5)
>-#define AD7746_VTSETUP_EXTREF		(1 << 4)
>-#define AD7746_VTSETUP_VTSHORT		(1 << 1)
>-#define AD7746_VTSETUP_VTCHOP		(1 << 0)
>+#define AD7746_VTSETUP_EXTREF		BIT(4)
>+#define AD7746_VTSETUP_VTSHORT		BIT(1)
>+#define AD7746_VTSETUP_VTCHOP		BIT(0)
> 
>/* Excitation Setup Register Bit Designations (AD7746_REG_EXC_SETUP) */
> #define AD7746_EXCSETUP_CLKCTRL		BIT(7)
>@@ -82,7 +82,7 @@
> #define AD7746_CONF_MODE_GAIN_CAL	(6 << 0)
> 
> /* CAPDAC Register Bit Designations (AD7746_REG_CAPDACx) */
>-#define AD7746_CAPDAC_DACEN		(1 << 7)
>+#define AD7746_CAPDAC_DACEN		BIT(7)
> #define AD7746_CAPDAC_DACP(x)		((x) & 0x7F)
> 
> /*

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

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

* Re: [Outreachy kernel] [PATCH v2] staging: iio: Remove unneeded parentheses.
  2017-03-29 16:05 [PATCH v2] staging: iio: Remove unneeded parentheses Arushi Singhal
  2017-03-29 16:27 ` Jonathan Cameron
@ 2017-03-29 20:37 ` Julia Lawall
  1 sibling, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2017-03-29 20:37 UTC (permalink / raw)
  To: Arushi Singhal
  Cc: lars, outreachy-kernel, Michael Hennerich, Jonathan Cameron,
	Hartmut Knaack, Peter Meerwald-Stadler, Greg Kroah-Hartman,
	linux-iio, devel, linux-kernel



On Wed, 29 Mar 2017, Arushi Singhal wrote:

> Remove the extra parenthesis remove the checkpatch issue.

The patch replaces 1 << x by calls to BIT.  That doesn't correspond to the
commit message.

julia

>
> Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
> ---
> changes in v2
>  -done the changes according to the current tree
>
>  drivers/staging/iio/cdc/ad7746.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
> index c2c8aa5585e4..7fa9913386f5 100644
> --- a/drivers/staging/iio/cdc/ad7746.c
> +++ b/drivers/staging/iio/cdc/ad7746.c
> @@ -45,10 +45,10 @@
>  #define AD7746_STATUS_RDYCAP		BIT(0)
>
>  /* Capacitive Channel Setup Register Bit Designations (AD7746_REG_CAP_SETUP) */
> -#define AD7746_CAPSETUP_CAPEN		(1 << 7)
> -#define AD7746_CAPSETUP_CIN2		(1 << 6) /* AD7746 only */
> -#define AD7746_CAPSETUP_CAPDIFF		(1 << 5)
> -#define AD7746_CAPSETUP_CACHOP		(1 << 0)
> +#define AD7746_CAPSETUP_CAPEN		BIT(7)
> +#define AD7746_CAPSETUP_CIN2		BIT(6) /* AD7746 only */
> +#define AD7746_CAPSETUP_CAPDIFF		BIT(5)
> +#define AD7746_CAPSETUP_CACHOP		BIT(0)
>
>  /* Voltage/Temperature Setup Register Bit Designations (AD7746_REG_VT_SETUP) */
>  #define AD7746_VTSETUP_VTEN		(1 << 7)
> @@ -56,9 +56,9 @@
>  #define AD7746_VTSETUP_VTMD_EXT_TEMP	(1 << 5)
>  #define AD7746_VTSETUP_VTMD_VDD_MON	(2 << 5)
>  #define AD7746_VTSETUP_VTMD_EXT_VIN	(3 << 5)
> -#define AD7746_VTSETUP_EXTREF		(1 << 4)
> -#define AD7746_VTSETUP_VTSHORT		(1 << 1)
> -#define AD7746_VTSETUP_VTCHOP		(1 << 0)
> +#define AD7746_VTSETUP_EXTREF		BIT(4)
> +#define AD7746_VTSETUP_VTSHORT		BIT(1)
> +#define AD7746_VTSETUP_VTCHOP		BIT(0)
>
>  /* Excitation Setup Register Bit Designations (AD7746_REG_EXC_SETUP) */
>  #define AD7746_EXCSETUP_CLKCTRL		BIT(7)
> @@ -82,7 +82,7 @@
>  #define AD7746_CONF_MODE_GAIN_CAL	(6 << 0)
>
>  /* CAPDAC Register Bit Designations (AD7746_REG_CAPDACx) */
> -#define AD7746_CAPDAC_DACEN		(1 << 7)
> +#define AD7746_CAPDAC_DACEN		BIT(7)
>  #define AD7746_CAPDAC_DACP(x)		((x) & 0x7F)
>
>  /*
> --
> 2.11.0
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170329160551.GA7230%40arushi-HP-Pavilion-Notebook.
> For more options, visit https://groups.google.com/d/optout.
>

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

end of thread, other threads:[~2017-03-29 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-29 16:05 [PATCH v2] staging: iio: Remove unneeded parentheses Arushi Singhal
2017-03-29 16:27 ` Jonathan Cameron
2017-03-29 20:37 ` [Outreachy kernel] " Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox