iio: light: tsl2563: Fix checkpatch warnings
cover iio: light: tsl2563: Fix checkpatch warnings
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(-)
Signature · 1 line
2.20.1
PATCH 1/2 iio: light: tsl2563: Wrap comment description
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)
--- drivers/iio/light/tsl2563.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/light/tsl2563.c +3 -3
@@ -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)
Signature · 1 line
2.20.1
PATCH 2/2 iio: light: tsl2563: Rename macro to fix typo
In reply to Nishant MalpaniThis patch renames macro to fix the following warning generated by checkpatch.pl:
WARNING: 'DISBLED' may be misspelled - perhaps 'DISABLED'?
--- drivers/iio/light/tsl2563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/tsl2563.c +1 -1
@@ -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)
Signature · 1 line
2.20.1
Re: [PATCH 2/2] iio: light: tsl2563: Rename macro to fix typo
Quoted 6 lines · On Wed, 18 Mar 2020 13:33:11 +0530 Nishant Malpani <[email protected]>…
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
Quoted 17 lines
--- drivers/iio/light/tsl2563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/light/tsl2563.c +1
-1@@ -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)
Re: [PATCH 1/2] iio: light: tsl2563: Wrap comment description
In reply to Nishant MalpaniQuoted 4 lines · Nishant Malpani
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.
drivers/iio/light/tsl2563.c
Quoted 1 line
drivers/iio/light/tsl2563.c +0
-0
[]
Quoted 13 lines
drivers/iio/light/tsl2563.c +3
-3@@ -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)
Re: [PATCH 1/2] iio: light: tsl2563: Wrap comment description
Quoted 11 lines · Joe Perches
Quoted 4 lines · Nishant Malpani
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
Quoted 16 lines
drivers/iio/light/tsl2563.c
Quoted 1 line
drivers/iio/light/tsl2563.c +0
-0[]
Quoted 13 lines
drivers/iio/light/tsl2563.c +3
-3@@ -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)