* [PATCH] fbtft: Cleanup line over 80 character warnings
@ 2019-06-27 12:12 Lukas Schneider
2019-06-27 12:26 ` Dan Carpenter
2019-06-27 16:44 ` Greg KH
0 siblings, 2 replies; 3+ messages in thread
From: Lukas Schneider @ 2019-06-27 12:12 UTC (permalink / raw)
To: leobras.c, digholebhagyashri, bhanusreemahesh, daniel.vetter,
der_wolf_, payal.s.kshirsagar.98, dri-devel, linux-fbdev, devel,
linux-kernel
Cc: Lukas Schneider, Jannik Moritz, linux-kernel
Cleanup the line over 80 character warnings, reported by checkpatch
Signed-off-by: Lukas Schneider <lukas.s.schneider@fau.de>
Signed-off-by: Jannik Moritz <jannik.moritz@fau.de>
Cc: <linux-kernel@i4.cs.fau.de>
---
drivers/staging/fbtft/fbtft-sysfs.c | 3 ++-
drivers/staging/fbtft/fbtft.h | 26 ++++++++++++++++++++++----
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-sysfs.c b/drivers/staging/fbtft/fbtft-sysfs.c
index 2a5c630dab87..78d2b81ea2e7 100644
--- a/drivers/staging/fbtft/fbtft-sysfs.c
+++ b/drivers/staging/fbtft/fbtft-sysfs.c
@@ -68,7 +68,8 @@ int fbtft_gamma_parse_str(struct fbtft_par *par, u32 *curves,
ret = get_next_ulong(&curve_p, &val, " ", 16);
if (ret)
goto out;
- curves[curve_counter * par->gamma.num_values + value_counter] = val;
+ curves[curve_counter * par->gamma.num_values
+ + value_counter] = val;
value_counter++;
}
if (value_counter != par->gamma.num_values) {
diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 9b6bdb62093d..cddbfd4ffa10 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -348,9 +348,25 @@ module_exit(fbtft_driver_module_exit);
/* shorthand debug levels */
#define DEBUG_LEVEL_1 DEBUG_REQUEST_GPIOS
-#define DEBUG_LEVEL_2 (DEBUG_LEVEL_1 | DEBUG_DRIVER_INIT_FUNCTIONS | DEBUG_TIME_FIRST_UPDATE)
-#define DEBUG_LEVEL_3 (DEBUG_LEVEL_2 | DEBUG_RESET | DEBUG_INIT_DISPLAY | DEBUG_BLANK | DEBUG_REQUEST_GPIOS | DEBUG_FREE_GPIOS | DEBUG_VERIFY_GPIOS | DEBUG_BACKLIGHT | DEBUG_SYSFS)
-#define DEBUG_LEVEL_4 (DEBUG_LEVEL_2 | DEBUG_FB_READ | DEBUG_FB_WRITE | DEBUG_FB_FILLRECT | DEBUG_FB_COPYAREA | DEBUG_FB_IMAGEBLIT | DEBUG_FB_BLANK)
+#define DEBUG_LEVEL_2 (DEBUG_LEVEL_1 | \
+ DEBUG_DRIVER_INIT_FUNCTIONS | \
+ DEBUG_TIME_FIRST_UPDATE)
+#define DEBUG_LEVEL_3 (DEBUG_LEVEL_2 | \
+ DEBUG_RESET | \
+ DEBUG_INIT_DISPLAY | \
+ DEBUG_BLANK | \
+ DEBUG_REQUEST_GPIOS | \
+ DEBUG_FREE_GPIOS | \
+ DEBUG_VERIFY_GPIOS | \
+ DEBUG_BACKLIGHT | \
+ DEBUG_SYSFS)
+#define DEBUG_LEVEL_4 (DEBUG_LEVEL_2 | \
+ DEBUG_FB_READ | \
+ DEBUG_FB_WRITE | \
+ DEBUG_FB_FILLRECT | \
+ DEBUG_FB_COPYAREA | \
+ DEBUG_FB_IMAGEBLIT | \
+ DEBUG_FB_BLANK)
#define DEBUG_LEVEL_5 (DEBUG_LEVEL_3 | DEBUG_UPDATE_DISPLAY)
#define DEBUG_LEVEL_6 (DEBUG_LEVEL_4 | DEBUG_LEVEL_5)
#define DEBUG_LEVEL_7 0xFFFFFFFF
@@ -392,7 +408,9 @@ module_exit(fbtft_driver_module_exit);
#define fbtft_init_dbg(dev, format, arg...) \
do { \
if (unlikely((dev)->platform_data && \
- (((struct fbtft_platform_data *)(dev)->platform_data)->display.debug & DEBUG_DRIVER_INIT_FUNCTIONS))) \
+ (((struct fbtft_platform_data *) \
+ (dev)->platform_data)->display.debug \
+ & DEBUG_DRIVER_INIT_FUNCTIONS))) \
dev_info(dev, format, ##arg); \
} while (0)
--
2.19.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fbtft: Cleanup line over 80 character warnings
2019-06-27 12:12 [PATCH] fbtft: Cleanup line over 80 character warnings Lukas Schneider
@ 2019-06-27 12:26 ` Dan Carpenter
2019-06-27 16:44 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2019-06-27 12:26 UTC (permalink / raw)
To: Lukas Schneider
Cc: devel, leobras.c, linux-fbdev, digholebhagyashri, linux-kernel,
daniel.vetter, der_wolf_, linux-kernel, dri-devel,
bhanusreemahesh, payal.s.kshirsagar.98, Jannik Moritz
Sorry, I don't feel like this makes it more readable.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fbtft: Cleanup line over 80 character warnings
2019-06-27 12:12 [PATCH] fbtft: Cleanup line over 80 character warnings Lukas Schneider
2019-06-27 12:26 ` Dan Carpenter
@ 2019-06-27 16:44 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2019-06-27 16:44 UTC (permalink / raw)
To: Lukas Schneider
Cc: leobras.c, digholebhagyashri, bhanusreemahesh, daniel.vetter,
der_wolf_, payal.s.kshirsagar.98, dri-devel, linux-fbdev, devel,
linux-kernel, Jannik Moritz, linux-kernel
On Thu, Jun 27, 2019 at 02:12:40PM +0200, Lukas Schneider wrote:
> Cleanup the line over 80 character warnings, reported by checkpatch
>
> Signed-off-by: Lukas Schneider <lukas.s.schneider@fau.de>
> Signed-off-by: Jannik Moritz <jannik.moritz@fau.de>
> Cc: <linux-kernel@i4.cs.fau.de>
> ---
> drivers/staging/fbtft/fbtft-sysfs.c | 3 ++-
> drivers/staging/fbtft/fbtft.h | 26 ++++++++++++++++++++++----
> 2 files changed, 24 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/fbtft/fbtft-sysfs.c b/drivers/staging/fbtft/fbtft-sysfs.c
> index 2a5c630dab87..78d2b81ea2e7 100644
> --- a/drivers/staging/fbtft/fbtft-sysfs.c
> +++ b/drivers/staging/fbtft/fbtft-sysfs.c
> @@ -68,7 +68,8 @@ int fbtft_gamma_parse_str(struct fbtft_par *par, u32 *curves,
> ret = get_next_ulong(&curve_p, &val, " ", 16);
> if (ret)
> goto out;
> - curves[curve_counter * par->gamma.num_values + value_counter] = val;
> + curves[curve_counter * par->gamma.num_values
> + + value_counter] = val;
Ick, that's horrible to read now, right?
> value_counter++;
> }
> if (value_counter != par->gamma.num_values) {
> diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
> index 9b6bdb62093d..cddbfd4ffa10 100644
> --- a/drivers/staging/fbtft/fbtft.h
> +++ b/drivers/staging/fbtft/fbtft.h
> @@ -348,9 +348,25 @@ module_exit(fbtft_driver_module_exit);
>
> /* shorthand debug levels */
> #define DEBUG_LEVEL_1 DEBUG_REQUEST_GPIOS
> -#define DEBUG_LEVEL_2 (DEBUG_LEVEL_1 | DEBUG_DRIVER_INIT_FUNCTIONS | DEBUG_TIME_FIRST_UPDATE)
> -#define DEBUG_LEVEL_3 (DEBUG_LEVEL_2 | DEBUG_RESET | DEBUG_INIT_DISPLAY | DEBUG_BLANK | DEBUG_REQUEST_GPIOS | DEBUG_FREE_GPIOS | DEBUG_VERIFY_GPIOS | DEBUG_BACKLIGHT | DEBUG_SYSFS)
> -#define DEBUG_LEVEL_4 (DEBUG_LEVEL_2 | DEBUG_FB_READ | DEBUG_FB_WRITE | DEBUG_FB_FILLRECT | DEBUG_FB_COPYAREA | DEBUG_FB_IMAGEBLIT | DEBUG_FB_BLANK)
> +#define DEBUG_LEVEL_2 (DEBUG_LEVEL_1 | \
> + DEBUG_DRIVER_INIT_FUNCTIONS | \
> + DEBUG_TIME_FIRST_UPDATE)
> +#define DEBUG_LEVEL_3 (DEBUG_LEVEL_2 | \
> + DEBUG_RESET | \
> + DEBUG_INIT_DISPLAY | \
> + DEBUG_BLANK | \
> + DEBUG_REQUEST_GPIOS | \
> + DEBUG_FREE_GPIOS | \
> + DEBUG_VERIFY_GPIOS | \
> + DEBUG_BACKLIGHT | \
> + DEBUG_SYSFS)
> +#define DEBUG_LEVEL_4 (DEBUG_LEVEL_2 | \
> + DEBUG_FB_READ | \
> + DEBUG_FB_WRITE | \
> + DEBUG_FB_FILLRECT | \
> + DEBUG_FB_COPYAREA | \
> + DEBUG_FB_IMAGEBLIT | \
> + DEBUG_FB_BLANK)
> #define DEBUG_LEVEL_5 (DEBUG_LEVEL_3 | DEBUG_UPDATE_DISPLAY)
> #define DEBUG_LEVEL_6 (DEBUG_LEVEL_4 | DEBUG_LEVEL_5)
> #define DEBUG_LEVEL_7 0xFFFFFFFF
All of these special debug "levels" need to go away now that the drivers
are working, and just use the in-kernel debugging macros instead.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-27 16:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-27 12:12 [PATCH] fbtft: Cleanup line over 80 character warnings Lukas Schneider
2019-06-27 12:26 ` Dan Carpenter
2019-06-27 16:44 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).