* [PATCH v6 1/2] Staging: fbtft: line over 80 characters
@ 2019-03-13 8:15 Bhagyashri Dighole
2019-03-13 8:15 ` [PATCH v6 2/2] staging: fbtft: ternary statement to if statement Bhagyashri Dighole
0 siblings, 1 reply; 3+ messages in thread
From: Bhagyashri Dighole @ 2019-03-13 8:15 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Outreachy
Fix the checkpatch.pl warning
WARNING: line over 80 characters
Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
---
Changes in v6:
- Drop some invalid changes.
Changes in v5:
- Make patch series.
Changes in v4:
- Convert a ternary statement into a if statement.
Changes in v3:
- Make the code in original form.
- Use tab to line up the code.
Changes in v2:
- Improve code order.
- Make the code more readable.
drivers/staging/fbtft/fb_ssd1331.c | 3 ++-
drivers/staging/fbtft/flexfb.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ssd1331.c b/drivers/staging/fbtft/fb_ssd1331.c
index 9f54fe2..4cfe9f8 100644
--- a/drivers/staging/fbtft/fb_ssd1331.c
+++ b/drivers/staging/fbtft/fb_ssd1331.c
@@ -74,7 +74,8 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)
for (i = 0; i < len; i++)
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__);
}
va_start(args, len);
diff --git a/drivers/staging/fbtft/flexfb.c b/drivers/staging/fbtft/flexfb.c
index b91b459..3747321 100644
--- a/drivers/staging/fbtft/flexfb.c
+++ b/drivers/staging/fbtft/flexfb.c
@@ -671,7 +671,8 @@ static int flexfb_probe_common(struct spi_device *sdev,
break;
case 9:
if (regwidth == 16) {
- dev_err(dev, "argument 'regwidth': %d is not supported with buswidth=%d and SPI.\n", regwidth, buswidth);
+ dev_err(dev, "argument 'regwidth': %d is not supported with buswidth=%d and SPI.\n",
+ regwidth, buswidth);
return -EINVAL;
}
par->fbtftops.write_register = fbtft_write_reg8_bus9;
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v6 2/2] staging: fbtft: ternary statement to if statement.
2019-03-13 8:15 [PATCH v6 1/2] Staging: fbtft: line over 80 characters Bhagyashri Dighole
@ 2019-03-13 8:15 ` Bhagyashri Dighole
2019-03-17 10:16 ` [Outreachy kernel] " Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Bhagyashri Dighole @ 2019-03-13 8:15 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Outreachy
Convert a ternary statement into a if statement which is detected while
resolving "WARNING: line over 80 characters".
Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
---
Changes in v6:
- Drop some invalid changes.
Changes in v5:
- Make patch series.
Changes in v4:
- Convert a ternary statement into a if statement.
Changes in v3:
- Make the code in original form.
- Use tab to line up the code.
Changes in v2:
- Improve code order.
- Make the code more readable.
drivers/staging/fbtft/fb_ssd1306.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/fbtft/fb_ssd1306.c b/drivers/staging/fbtft/fb_ssd1306.c
index d7c5e2e..1fb0098 100644
--- a/drivers/staging/fbtft/fb_ssd1306.c
+++ b/drivers/staging/fbtft/fb_ssd1306.c
@@ -184,7 +184,8 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
for (y = 0; y < yres / 8; y++) {
*buf = 0x00;
for (i = 0; i < 8; i++)
- *buf |= (vmem16[(y * 8 + i) * xres + x] ? 1 : 0) << i;
+ if (vmem16[(y * 8 + i) * xres + x])
+ *buf |= 1 << i;
buf++;
}
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH v6 2/2] staging: fbtft: ternary statement to if statement.
2019-03-13 8:15 ` [PATCH v6 2/2] staging: fbtft: ternary statement to if statement Bhagyashri Dighole
@ 2019-03-17 10:16 ` Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2019-03-17 10:16 UTC (permalink / raw)
To: Bhagyashri Dighole; +Cc: Outreachy
On Wed, Mar 13, 2019 at 01:45:10PM +0530, Bhagyashri Dighole wrote:
> Convert a ternary statement into a if statement which is detected while
> resolving "WARNING: line over 80 characters".
>
> Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
> ---
> Changes in v6:
> - Drop some invalid changes.
>
> Changes in v5:
> - Make patch series.
>
> Changes in v4:
> - Convert a ternary statement into a if statement.
>
> Changes in v3:
> - Make the code in original form.
> - Use tab to line up the code.
>
> Changes in v2:
> - Improve code order.
> - Make the code more readable.
>
> drivers/staging/fbtft/fb_ssd1306.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/fbtft/fb_ssd1306.c b/drivers/staging/fbtft/fb_ssd1306.c
> index d7c5e2e..1fb0098 100644
> --- a/drivers/staging/fbtft/fb_ssd1306.c
> +++ b/drivers/staging/fbtft/fb_ssd1306.c
> @@ -184,7 +184,8 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
> for (y = 0; y < yres / 8; y++) {
> *buf = 0x00;
> for (i = 0; i < 8; i++)
> - *buf |= (vmem16[(y * 8 + i) * xres + x] ? 1 : 0) << i;
> + if (vmem16[(y * 8 + i) * xres + x])
> + *buf |= 1 << i;
You are geting much closer.
What about using the BIT() macro here instead?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-17 10:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-13 8:15 [PATCH v6 1/2] Staging: fbtft: line over 80 characters Bhagyashri Dighole
2019-03-13 8:15 ` [PATCH v6 2/2] staging: fbtft: ternary statement to if statement Bhagyashri Dighole
2019-03-17 10:16 ` [Outreachy kernel] " Greg Kroah-Hartman
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.