Thread (10 messages) 10 messages, 3 authors, 2021-07-31

Re: [PATCH v2 3/3] staging/fbtft: Fix braces coding style

flat view

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2021-07-24 18:02:08
Also in: dri-devel, linux-staging, lkml

Hi Len,

On Sat, Jul 24, 2021 at 7:44 PM Len Baker [off-list ref] wrote:
Add braces to the "for" loop and remove braces from the "if" statement.
This way the kernel coding style is followed.

Signed-off-by: Len Baker <redacted>
Thanks for your patch!
quoted hunk ↗ jump to hunk
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
quoted hunk ↗ jump to hunk
@@ -1016,10 +1018,9 @@ int fbtft_init_display(struct fbtft_par *par)

        i = 0;
        while (i < FBTFT_MAX_INIT_SEQUENCE) {
-               if (par->init_sequence[i] == -3) {
-                       /* done */
-                       return 0;
-               }
These braces should not be removed, due to the presence of
the comment.
quoted hunk ↗ jump to hunk
+               if (par->init_sequence[i] == -3)
+                       return 0; /* done */
+
                if (par->init_sequence[i] >= 0) {
                        dev_err(par->info->device,
                                "missing delimiter at position %d\n", i);
Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help