This patchset cleans up the TSL2563 driver by fixing warnings generated
by checkpatch.pl.
Nishant Malpani (2):
iio: light: tsl2563: Wrap comment description
iio: light: tsl2563: Rename macro to fix typo
drivers/iio/light/tsl2563.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--
2.20.1
This patch wraps the comment description at 75 chars. Fixes the
following warning generated by checkpatch.pl:
WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
Signed-off-by: Nishant Malpani <[email protected]>
---
drivers/iio/light/tsl2563.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
index d8c40a83097d..260b38ee81f7 100644
--- a/drivers/iio/light/tsl2563.c
+++ b/drivers/iio/light/tsl2563.c
@@ -222,9 +222,9 @@ static int tsl2563_read_id(struct tsl2563_chip *chip, u8 *id)
}
/*
- * "Normalized" ADC value is one obtained with 400ms of integration time and
- * 16x gain. This function returns the number of bits of shift needed to
- * convert between normalized values and HW values obtained using given
+ * "Normalized" ADC value is one obtained with 400ms of integration time
+ * and 16x gain. This function returns the number of bits of shift needed
+ * to convert between normalized values and HW values obtained using given
* timing and gain settings.
*/
static int tsl2563_adc_shiftbits(u8 timing)
--
2.20.1
This patch renames macro to fix the following warning generated by
checkpatch.pl:
WARNING: 'DISBLED' may be misspelled - perhaps 'DISABLED'?
Signed-off-by: Nishant Malpani <[email protected]>
---
drivers/iio/light/tsl2563.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
index 260b38ee81f7..356f4927cc46 100644
--- a/drivers/iio/light/tsl2563.c
+++ b/drivers/iio/light/tsl2563.c
@@ -69,7 +69,7 @@
#define TSL2563_TIMING_GAIN16 0x10
#define TSL2563_TIMING_GAIN1 0x00
-#define TSL2563_INT_DISBLED 0x00
+#define TSL2563_INT_DISABLED 0x00
#define TSL2563_INT_LEVEL 0x10
#define TSL2563_INT_PERSIST(n) ((n) & 0x0F)
--
2.20.1
On Wed, 18 Mar 2020 13:33:11 +0530
Nishant Malpani <[email protected]> wrote:
> This patch renames macro to fix the following warning generated by
> checkpatch.pl:
>
> WARNING: 'DISBLED' may be misspelled - perhaps 'DISABLED'?
>
> Signed-off-by: Nishant Malpani <[email protected]>
Applied.
Thanks,
Jonathan
> ---
> drivers/iio/light/tsl2563.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
> index 260b38ee81f7..356f4927cc46 100644
> --- a/drivers/iio/light/tsl2563.c
> +++ b/drivers/iio/light/tsl2563.c
> @@ -69,7 +69,7 @@
> #define TSL2563_TIMING_GAIN16 0x10
> #define TSL2563_TIMING_GAIN1 0x00
>
> -#define TSL2563_INT_DISBLED 0x00
> +#define TSL2563_INT_DISABLED 0x00
> #define TSL2563_INT_LEVEL 0x10
> #define TSL2563_INT_PERSIST(n) ((n) & 0x0F)
>
On Wed, 2020-03-18 at 13:33 +0530, Nishant Malpani wrote:
> This patch wraps the comment description at 75 chars. Fixes the
> following warning generated by checkpatch.pl:
>
> WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
Please do not scan files as patches.
checkpatch does not emit this message on a file
when used properly with the -f option.
> diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
[]
> @@ -222,9 +222,9 @@ static int tsl2563_read_id(struct tsl2563_chip *chip, u8 *id)
> }
>
> /*
> - * "Normalized" ADC value is one obtained with 400ms of integration time and
> - * 16x gain. This function returns the number of bits of shift needed to
> - * convert between normalized values and HW values obtained using given
> + * "Normalized" ADC value is one obtained with 400ms of integration time
> + * and 16x gain. This function returns the number of bits of shift needed
> + * to convert between normalized values and HW values obtained using given
> * timing and gain settings.
> */
> static int tsl2563_adc_shiftbits(u8 timing)
On 21/03/20 5:21 pm, Joe Perches wrote:
> On Wed, 2020-03-18 at 13:33 +0530, Nishant Malpani wrote:
>> This patch wraps the comment description at 75 chars. Fixes the
>> following warning generated by checkpatch.pl:
>>
>> WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
>
> Please do not scan files as patches.
>
> checkpatch does not emit this message on a file
> when used properly with the -f option.
>
You're right, Joe. I had used checkpatch.pl without the -f option on a
file, ergo giving me the aforementioned warning. My bad, I shall refrain
from not doing this in the future. Thank you and Jonathan for correcting me.
With regards,
Nishant Malpani
>> diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
> []
>> @@ -222,9 +222,9 @@ static int tsl2563_read_id(struct tsl2563_chip *chip, u8 *id)
>> }
>>
>> /*
>> - * "Normalized" ADC value is one obtained with 400ms of integration time and
>> - * 16x gain. This function returns the number of bits of shift needed to
>> - * convert between normalized values and HW values obtained using given
>> + * "Normalized" ADC value is one obtained with 400ms of integration time
>> + * and 16x gain. This function returns the number of bits of shift needed
>> + * to convert between normalized values and HW values obtained using given
>> * timing and gain settings.
>> */
>> static int tsl2563_adc_shiftbits(u8 timing)
>