All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] staging: iio: cdc: ad7152: Fix CamelCase checkpatch warning
       [not found] <cover.1475141738.git.anchalj109@gmail.com>
@ 2016-09-29  9:47 ` Anchal Jain
       [not found]   ` <c1540d4979226f22ca311535bcb98807@jic23.retrosnub.co.uk>
  2016-09-29  9:49 ` [PATCH 3/3] staging: iio: cdc: ad7152: CHECK:Please use a blank line Anchal Jain
  1 sibling, 1 reply; 4+ messages in thread
From: Anchal Jain @ 2016-09-29  9:47 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel, jic23

This patch fix the check detect by the checkpatch.pl
CHECK: Avoid CamelCase
Convert the names into normal naming pattern

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
---
 drivers/staging/iio/cdc/ad7152.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/iio/cdc/ad7152.c b/drivers/staging/iio/cdc/ad7152.c
index 1962052..2473af3 100644
--- a/drivers/staging/iio/cdc/ad7152.c
+++ b/drivers/staging/iio/cdc/ad7152.c
@@ -48,10 +48,10 @@
 
 /* Setup Register Bit Designations (AD7152_REG_CHx_SETUP) */
 #define AD7152_SETUP_CAPDIFF		bit(5)
-#define AD7152_SETUP_RANGE_2pF		(0 << 6)
-#define AD7152_SETUP_RANGE_0_5pF	bit(6)
-#define AD7152_SETUP_RANGE_1pF		(2 << 6)
-#define AD7152_SETUP_RANGE_4pF		(3 << 6)
+#define AD7152_SETUP_RANGE_2pf		(0 << 6)
+#define AD7152_SETUP_RANGE_0_5pf	bit(6)
+#define AD7152_SETUP_RANGE_1pf		(2 << 6)
+#define AD7152_SETUP_RANGE_4pf		(3 << 6)
 #define AD7152_SETUP_RANGE(x)		((x) << 6)
 
 /* Config Register Bit Designations (AD7152_REG_CFG) */
@@ -298,7 +298,7 @@ static int ad7152_write_raw(struct iio_dev *indio_dev,
 			if (val2 == ad7152_scale_table[i])
 				break;
 
-		chip->setup[chan->channel] &= ~AD7152_SETUP_RANGE_4pF;
+		chip->setup[chan->channel] &= ~AD7152_SETUP_RANGE_4pf;
 		chip->setup[chan->channel] |= AD7152_SETUP_RANGE(i);
 
 		ret = i2c_smbus_write_byte_data(chip->client,
-- 
1.9.1



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

* [PATCH 3/3] staging: iio: cdc: ad7152: CHECK:Please use a blank line
       [not found] <cover.1475141738.git.anchalj109@gmail.com>
  2016-09-29  9:47 ` [PATCH 2/3] staging: iio: cdc: ad7152: Fix CamelCase checkpatch warning Anchal Jain
@ 2016-09-29  9:49 ` Anchal Jain
  2016-09-29 13:04   ` [Outreachy kernel] " Daniel Baluta
  1 sibling, 1 reply; 4+ messages in thread
From: Anchal Jain @ 2016-09-29  9:49 UTC (permalink / raw)
  To: gregkh; +Cc: outreachy-kernel, Michael.Hennerich, knaack.h

This patch fixes the checkpatch.pl issue:

CHECK: Please use a blank line after function/struct/union/enum declarations

Signed-off-by: Anchal Jain <anchalj109@gmail.com>
---
 drivers/staging/iio/cdc/ad7152.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/iio/cdc/ad7152.c b/drivers/staging/iio/cdc/ad7152.c
index 2473af3..e383f00 100644
--- a/drivers/staging/iio/cdc/ad7152.c
+++ b/drivers/staging/iio/cdc/ad7152.c
@@ -134,6 +134,7 @@ static inline ssize_t ad7152_start_calib(struct device *dev,
 	mutex_unlock(&indio_dev->mlock);
 	return len;
 }
+
 static ssize_t ad7152_start_offset_calib(struct device *dev,
 					 struct device_attribute *attr,
 					 const char *buf,
@@ -142,6 +143,7 @@ static ssize_t ad7152_start_offset_calib(struct device *dev,
 	return ad7152_start_calib(dev, attr, buf, len,
 				  AD7152_CONF_MODE_OFFS_CAL);
 }
+
 static ssize_t ad7152_start_gain_calib(struct device *dev,
 				       struct device_attribute *attr,
 				       const char *buf,
@@ -317,6 +319,7 @@ out:
 	mutex_unlock(&indio_dev->mlock);
 	return ret;
 }
+
 static int ad7152_read_raw(struct iio_dev *indio_dev,
 			   struct iio_chan_spec const *chan,
 			   int *val, int *val2,
@@ -470,6 +473,7 @@ static const struct iio_chan_spec ad7152_channels[] = {
 		BIT(IIO_CHAN_INFO_SCALE),
 	}
 };
+
 /*
  * device probe and remove
  */
-- 
1.9.1



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

* Re: [PATCH 2/3] staging: iio: cdc: ad7152: Fix CamelCase checkpatch warning
       [not found]   ` <c1540d4979226f22ca311535bcb98807@jic23.retrosnub.co.uk>
@ 2016-09-29 11:39     ` Anchal Jain
  0 siblings, 0 replies; 4+ messages in thread
From: Anchal Jain @ 2016-09-29 11:39 UTC (permalink / raw)
  To: jic23; +Cc: Greg KH, outreachy-kernel, jic23

[-- Attachment #1: Type: text/plain, Size: 2250 bytes --]

>Don't assume that checkpatch is right.
>
>Like all units that are named after a person (here Faraday)
>the unit should be capitals.  Checkpatch assumes that
>it is camel case but is wrong.
>
>J

Thank you for informing me next time I'll sure that kind of mistake not
happen.


On Thu, Sep 29, 2016 at 4:44 PM, <jic23@jic23.retrosnub.co.uk> wrote:

> On 29.09.2016 10:47, Anchal Jain wrote:
>
>> This patch fix the check detect by the checkpatch.pl
>> CHECK: Avoid CamelCase
>> Convert the names into normal naming pattern
>>
> Don't assume that checkpatch is right.
>
> Like all units that are named after a person (here Faraday)
> the unit should be capitals.  Checkpatch assumes that
> it is camel case but is wrong.
>
> J
>
>
>> Signed-off-by: Anchal Jain <anchalj109@gmail.com>
>> ---
>>  drivers/staging/iio/cdc/ad7152.c | 10 +++++-----
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/staging/iio/cdc/ad7152.c
>> b/drivers/staging/iio/cdc/ad7152.c
>> index 1962052..2473af3 100644
>> --- a/drivers/staging/iio/cdc/ad7152.c
>> +++ b/drivers/staging/iio/cdc/ad7152.c
>> @@ -48,10 +48,10 @@
>>
>>  /* Setup Register Bit Designations (AD7152_REG_CHx_SETUP) */
>>  #define AD7152_SETUP_CAPDIFF           bit(5)
>> -#define AD7152_SETUP_RANGE_2pF         (0 << 6)
>> -#define AD7152_SETUP_RANGE_0_5pF       bit(6)
>> -#define AD7152_SETUP_RANGE_1pF         (2 << 6)
>> -#define AD7152_SETUP_RANGE_4pF         (3 << 6)
>> +#define AD7152_SETUP_RANGE_2pf         (0 << 6)
>> +#define AD7152_SETUP_RANGE_0_5pf       bit(6)
>> +#define AD7152_SETUP_RANGE_1pf         (2 << 6)
>> +#define AD7152_SETUP_RANGE_4pf         (3 << 6)
>>  #define AD7152_SETUP_RANGE(x)          ((x) << 6)
>>
>>  /* Config Register Bit Designations (AD7152_REG_CFG) */
>> @@ -298,7 +298,7 @@ static int ad7152_write_raw(struct iio_dev *indio_dev,
>>                         if (val2 == ad7152_scale_table[i])
>>                                 break;
>>
>> -               chip->setup[chan->channel] &= ~AD7152_SETUP_RANGE_4pF;
>> +               chip->setup[chan->channel] &= ~AD7152_SETUP_RANGE_4pf;
>>                 chip->setup[chan->channel] |= AD7152_SETUP_RANGE(i);
>>
>>                 ret = i2c_smbus_write_byte_data(chip->client,
>>
>

[-- Attachment #2: Type: text/html, Size: 3382 bytes --]

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

* Re: [Outreachy kernel] [PATCH 3/3] staging: iio: cdc: ad7152: CHECK:Please use a blank line
  2016-09-29  9:49 ` [PATCH 3/3] staging: iio: cdc: ad7152: CHECK:Please use a blank line Anchal Jain
@ 2016-09-29 13:04   ` Daniel Baluta
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Baluta @ 2016-09-29 13:04 UTC (permalink / raw)
  To: Anchal Jain
  Cc: Greg Kroah-Hartman, outreachy-kernel, Hennerich, Michael, Hartmut Knaack

Hi Anchal,

Commit message should be clearer than that, insisting on why the
change is needed.

e.g.

staging: iio: cdc: ad7152: Add blank line after declarations to
increase readability


On Thu, Sep 29, 2016 at 12:49 PM, Anchal Jain <anchalj109@gmail.com> wrote:
> This patch fixes the checkpatch.pl issue:
>
> CHECK: Please use a blank line after function/struct/union/enum declarations
>
> Signed-off-by: Anchal Jain <anchalj109@gmail.com>
> ---
>  drivers/staging/iio/cdc/ad7152.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/staging/iio/cdc/ad7152.c b/drivers/staging/iio/cdc/ad7152.c
> index 2473af3..e383f00 100644
> --- a/drivers/staging/iio/cdc/ad7152.c
> +++ b/drivers/staging/iio/cdc/ad7152.c
> @@ -134,6 +134,7 @@ static inline ssize_t ad7152_start_calib(struct device *dev,
>         mutex_unlock(&indio_dev->mlock);
>         return len;
>  }
> +
>  static ssize_t ad7152_start_offset_calib(struct device *dev,
>                                          struct device_attribute *attr,
>                                          const char *buf,
> @@ -142,6 +143,7 @@ static ssize_t ad7152_start_offset_calib(struct device *dev,
>         return ad7152_start_calib(dev, attr, buf, len,
>                                   AD7152_CONF_MODE_OFFS_CAL);
>  }
> +
>  static ssize_t ad7152_start_gain_calib(struct device *dev,
>                                        struct device_attribute *attr,
>                                        const char *buf,
> @@ -317,6 +319,7 @@ out:
>         mutex_unlock(&indio_dev->mlock);
>         return ret;
>  }
> +
>  static int ad7152_read_raw(struct iio_dev *indio_dev,
>                            struct iio_chan_spec const *chan,
>                            int *val, int *val2,
> @@ -470,6 +473,7 @@ static const struct iio_chan_spec ad7152_channels[] = {
>                 BIT(IIO_CHAN_INFO_SCALE),
>         }
>  };
> +
>  /*
>   * device probe and remove
>   */
> --
> 1.9.1
>
> --
> 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/b7e14439773be72f471528ac4606413d19db383d.1475141738.git.anchalj109%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.


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

end of thread, other threads:[~2016-09-29 13:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1475141738.git.anchalj109@gmail.com>
2016-09-29  9:47 ` [PATCH 2/3] staging: iio: cdc: ad7152: Fix CamelCase checkpatch warning Anchal Jain
     [not found]   ` <c1540d4979226f22ca311535bcb98807@jic23.retrosnub.co.uk>
2016-09-29 11:39     ` Anchal Jain
2016-09-29  9:49 ` [PATCH 3/3] staging: iio: cdc: ad7152: CHECK:Please use a blank line Anchal Jain
2016-09-29 13:04   ` [Outreachy kernel] " Daniel Baluta

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.