* [PATCH] staging: fbtft: fix character limit, trailing ; warning, etc.
@ 2017-04-23 14:21 Eric Curtin
2017-04-28 10:07 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Eric Curtin @ 2017-04-23 14:21 UTC (permalink / raw)
To: thomas.petazzoni, gregkh; +Cc: devel, linux-kernel, Eric Curtin
checkpatch spits out a warning about the 80 character line limit. Split
the parameters of these functions onto different lines. Put the ; with
the macro caller instead. Lined up parameters as there was another
CHECK warning about that.
Signed-off-by: Eric Curtin <ericcurtin17@gmail.com>
---
drivers/staging/fbtft/fbtft-bus.c | 36 +++++++++++++++++++++---------------
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
index ec45043..f1522f4 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -24,7 +24,9 @@ void func(struct fbtft_par *par, int len, ...) \
buf[i] = (type)va_arg(args, unsigned int); \
} \
va_end(args); \
- fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, type, buf, len, "%s: ", __func__); \
+ fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, \
+ par->info->device, type, buf, len, "%s: ", \
+ __func__); \
} \
\
va_start(args, len); \
@@ -41,7 +43,9 @@ void func(struct fbtft_par *par, int len, ...) \
ret = par->fbtftops.write(par, par->buf, sizeof(type) + offset); \
if (ret < 0) { \
va_end(args); \
- dev_err(par->info->device, "%s: write() failed and returned %d\n", __func__, ret); \
+ dev_err(par->info->device, \
+ "%s: write() failed and returned %d\n", __func__, \
+ ret); \
return; \
} \
len--; \
@@ -60,17 +64,19 @@ void func(struct fbtft_par *par, int len, ...) \
len * (sizeof(type) + offset)); \
if (ret < 0) { \
va_end(args); \
- dev_err(par->info->device, "%s: write() failed and returned %d\n", __func__, ret); \
+ dev_err(par->info->device, \
+ "%s: write() failed and returned %d\n", \
+ __func__, ret); \
return; \
} \
} \
va_end(args); \
} \
-EXPORT_SYMBOL(func);
+EXPORT_SYMBOL(func)
-define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, )
-define_fbtft_write_reg(fbtft_write_reg16_bus8, u16, cpu_to_be16)
-define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, )
+define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, );
+define_fbtft_write_reg(fbtft_write_reg16_bus8, u16, cpu_to_be16);
+define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, );
void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
{
@@ -84,8 +90,8 @@ void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
for (i = 0; i < len; i++)
*(((u8 *)buf) + i) = (u8)va_arg(args, unsigned int);
va_end(args);
- fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par,
- par->info->device, u8, buf, len, "%s: ", __func__);
+ fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device,
+ u8, buf, len, "%s: ", __func__);
}
if (len <= 0)
return;
@@ -135,7 +141,7 @@ int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len)
size_t startbyte_size = 0;
fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n",
- __func__, offset, len);
+ __func__, offset, len);
remain = len / 2;
vmem16 = (u16 *)(par->info->screen_buffer + offset);
@@ -159,8 +165,8 @@ int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len)
while (remain) {
to_copy = min(tx_array_size, remain);
- dev_dbg(par->info->device, " to_copy=%zu, remain=%zu\n",
- to_copy, remain - to_copy);
+ dev_dbg(par->info->device, "to_copy=%zu, remain=%zu\n", to_copy,
+ remain - to_copy);
for (i = 0; i < to_copy; i++)
txbuf16[i] = cpu_to_be16(vmem16[i]);
@@ -189,7 +195,7 @@ int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len)
int ret = 0;
fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n",
- __func__, offset, len);
+ __func__, offset, len);
if (!par->txbuf.buf) {
dev_err(par->info->device, "%s: txbuf.buf is NULL\n", __func__);
@@ -204,7 +210,7 @@ int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len)
while (remain) {
to_copy = min(tx_array_size, remain);
dev_dbg(par->info->device, " to_copy=%zu, remain=%zu\n",
- to_copy, remain - to_copy);
+ to_copy, remain - to_copy);
#ifdef __LITTLE_ENDIAN
for (i = 0; i < to_copy; i += 2) {
@@ -239,7 +245,7 @@ int fbtft_write_vmem16_bus16(struct fbtft_par *par, size_t offset, size_t len)
u16 *vmem16;
fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n",
- __func__, offset, len);
+ __func__, offset, len);
vmem16 = (u16 *)(par->info->screen_buffer + offset);
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: fbtft: fix character limit, trailing ; warning, etc.
2017-04-23 14:21 [PATCH] staging: fbtft: fix character limit, trailing ; warning, etc Eric Curtin
@ 2017-04-28 10:07 ` Greg KH
2017-05-25 21:35 ` Eric Curtin
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2017-04-28 10:07 UTC (permalink / raw)
To: Eric Curtin; +Cc: thomas.petazzoni, devel, linux-kernel
On Sun, Apr 23, 2017 at 03:21:31PM +0100, Eric Curtin wrote:
> checkpatch spits out a warning about the 80 character line limit. Split
> the parameters of these functions onto different lines. Put the ; with
> the macro caller instead. Lined up parameters as there was another
> CHECK warning about that.
>
> Signed-off-by: Eric Curtin <ericcurtin17@gmail.com>
> ---
> drivers/staging/fbtft/fbtft-bus.c | 36 +++++++++++++++++++++---------------
> 1 file changed, 21 insertions(+), 15 deletions(-)
Patch does not apply to my tree at all :(
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: fbtft: fix character limit, trailing ; warning, etc.
2017-04-28 10:07 ` Greg KH
@ 2017-05-25 21:35 ` Eric Curtin
0 siblings, 0 replies; 5+ messages in thread
From: Eric Curtin @ 2017-05-25 21:35 UTC (permalink / raw)
To: Greg KH; +Cc: thomas.petazzoni, devel, Kernel development list
On 28 April 2017 at 11:07, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Sun, Apr 23, 2017 at 03:21:31PM +0100, Eric Curtin wrote:
>> checkpatch spits out a warning about the 80 character line limit. Split
>> the parameters of these functions onto different lines. Put the ; with
>> the macro caller instead. Lined up parameters as there was another
>> CHECK warning about that.
>>
>> Signed-off-by: Eric Curtin <ericcurtin17@gmail.com>
>> ---
>> drivers/staging/fbtft/fbtft-bus.c | 36 +++++++++++++++++++++---------------
>> 1 file changed, 21 insertions(+), 15 deletions(-)
>
> Patch does not apply to my tree at all :(
Hi Greg,
Sorry I didn't realize you replied. I gave up on these drivers because
I read around and saw that these drivers are unlikely to ever be merged
properly into the mainline kernel, while they use this deprecated
framework:
https://github.com/notro/fbtft/wiki/Development
I know you were involved in some of these conversations:
https://lkml.org/lkml/2016/11/23/146
My main reason for helping with this, was so my rpi3 display would
"just work" on future distro's I installed. I'd struggle to port to
this new framework as I have no experience with drivers.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: fbtft: fix character limit, trailing ; warning, etc.
2017-04-22 15:26 Eric Curtin
@ 2017-04-22 23:36 ` Joe Perches
0 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2017-04-22 23:36 UTC (permalink / raw)
To: Eric Curtin, thomas.petazzoni, gregkh; +Cc: devel, linux-kernel
On Sat, 2017-04-22 at 16:26 +0100, Eric Curtin wrote:
> checkpatch spits out a warning about the 80 character line limit. Split
> the parameters of these functions onto different lines. Put the ; with
> the macro caller instead. Lined up parameters as there was another
> CHECK warning about that.
[]
> diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
[]
> @@ -24,7 +24,14 @@ void func(struct fbtft_par *par, int len, ...) \
> buf[i] = (type)va_arg(args, unsigned int); \
> } \
> va_end(args); \
> - fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, type, buf, len, "%s: ", __func__); \
> + fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, \
> + par, \
> + par->info->device, \
> + type, \
> + buf, \
> + len, \
> + "%s: ", \
> + __func__); \
> } \
Multiple arguments per line please before 80 columns
fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, \
par->info->device, type, buf, len, \
"%s: ", __func__); \
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] staging: fbtft: fix character limit, trailing ; warning, etc.
@ 2017-04-22 15:26 Eric Curtin
2017-04-22 23:36 ` Joe Perches
0 siblings, 1 reply; 5+ messages in thread
From: Eric Curtin @ 2017-04-22 15:26 UTC (permalink / raw)
To: thomas.petazzoni, gregkh; +Cc: devel, linux-kernel, Eric Curtin
checkpatch spits out a warning about the 80 character line limit. Split
the parameters of these functions onto different lines. Put the ; with
the macro caller instead. Lined up parameters as there was another
CHECK warning about that.
Signed-off-by: Eric Curtin <ericcurtin17@gmail.com>
---
drivers/staging/fbtft/fbtft-bus.c | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c
index ec45043..3143050 100644
--- a/drivers/staging/fbtft/fbtft-bus.c
+++ b/drivers/staging/fbtft/fbtft-bus.c
@@ -24,7 +24,14 @@ void func(struct fbtft_par *par, int len, ...) \
buf[i] = (type)va_arg(args, unsigned int); \
} \
va_end(args); \
- fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, par, par->info->device, type, buf, len, "%s: ", __func__); \
+ fbtft_par_dbg_hex(DEBUG_WRITE_REGISTER, \
+ par, \
+ par->info->device, \
+ type, \
+ buf, \
+ len, \
+ "%s: ", \
+ __func__); \
} \
\
va_start(args, len); \
@@ -41,7 +48,10 @@ void func(struct fbtft_par *par, int len, ...) \
ret = par->fbtftops.write(par, par->buf, sizeof(type) + offset); \
if (ret < 0) { \
va_end(args); \
- dev_err(par->info->device, "%s: write() failed and returned %d\n", __func__, ret); \
+ dev_err(par->info->device, \
+ "%s: write() failed and returned %d\n", \
+ __func__, \
+ ret); \
return; \
} \
len--; \
@@ -60,17 +70,20 @@ void func(struct fbtft_par *par, int len, ...) \
len * (sizeof(type) + offset)); \
if (ret < 0) { \
va_end(args); \
- dev_err(par->info->device, "%s: write() failed and returned %d\n", __func__, ret); \
+ dev_err(par->info->device, \
+ "%s: write() failed and returned %d\n", \
+ __func__, \
+ ret); \
return; \
} \
} \
va_end(args); \
} \
-EXPORT_SYMBOL(func);
+EXPORT_SYMBOL(func)
-define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, )
-define_fbtft_write_reg(fbtft_write_reg16_bus8, u16, cpu_to_be16)
-define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, )
+define_fbtft_write_reg(fbtft_write_reg8_bus8, u8, );
+define_fbtft_write_reg(fbtft_write_reg16_bus8, u16, cpu_to_be16);
+define_fbtft_write_reg(fbtft_write_reg16_bus16, u16, );
void fbtft_write_reg8_bus9(struct fbtft_par *par, int len, ...)
{
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-05-25 21:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-23 14:21 [PATCH] staging: fbtft: fix character limit, trailing ; warning, etc Eric Curtin
2017-04-28 10:07 ` Greg KH
2017-05-25 21:35 ` Eric Curtin
-- strict thread matches above, loose matches on Subject: below --
2017-04-22 15:26 Eric Curtin
2017-04-22 23:36 ` Joe Perches
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).