Message ID | ZQEKFR1OPoXGI2lO@midnight (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | staging: fbtft: Removed unnecessary parenthesis around conditions to comply with the checkpatch coding style. | expand |
On Wed, Sep 13, 2023 at 11:02:13AM +1000, Angus Gardner wrote: > --- > drivers/staging/fbtft/fb_ra8875.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) No patch description and SoB, so Greg can't take this as-is. > - if ((par->info->var.xres == 320) && (par->info->var.yres == 240)) { > + if (par->info->var.xres == 320 && par->info->var.yres == 240) { Greg prefers explicit parentheses on complex expressions (see [1] and [2] for examples), hence NAK. Thanks. [1]: https://lore.kernel.org/linux-staging/ZCWGOZqdH1kWtOEq@kroah.com/ [2]: https://lore.kernel.org/linux-staging/Y%2FiaYtKk4VSokAFz@kroah.com/
On Fri, Sep 15, 2023 at 11:58:47AM +1000, angus gardner wrote: > Thanks for the feedback Bagas, > > "Then checkpatch is wrong, " lol > > Ill double check my SoB. > tl;dr: > A: http://en.wikipedia.org/wiki/Top_post > Q: Were do I find info about this thing called top-posting? > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > A: No. > Q: Should I include quotations after my reply? > > http://daringfireball.net/2007/07/on_top Also, don't send HTML emails as mailing lists reject them away. Last but not least, this is the third time you do parentheses fixup, for which Greg's bot said: > You sent a patch that has been sent multiple times in the past few > days, and is identical to ones that has been recently rejected. > Please always look at the mailing list traffic to determine if you are > duplicating other people's work. Again, read all Documentation/process/*.rst docs so that you won't make mistakes again as kernel developer. Bye!
diff --git a/drivers/staging/fbtft/fb_ra8875.c b/drivers/staging/fbtft/fb_ra8875.c index 398bdbf53c9a..658f915b8528 100644 --- a/drivers/staging/fbtft/fb_ra8875.c +++ b/drivers/staging/fbtft/fb_ra8875.c @@ -50,7 +50,7 @@ static int init_display(struct fbtft_par *par) par->fbtftops.reset(par); - if ((par->info->var.xres == 320) && (par->info->var.yres == 240)) { + if (par->info->var.xres == 320 && par->info->var.yres == 240) { /* PLL clock frequency */ write_reg(par, 0x88, 0x0A); write_reg(par, 0x89, 0x02); @@ -74,8 +74,7 @@ static int init_display(struct fbtft_par *par) write_reg(par, 0x1D, 0x0E); write_reg(par, 0x1E, 0x00); write_reg(par, 0x1F, 0x02); - } else if ((par->info->var.xres == 480) && - (par->info->var.yres == 272)) { + } else if (par->info->var.xres == 480 && par->info->var.yres == 272) { /* PLL clock frequency */ write_reg(par, 0x88, 0x0A); write_reg(par, 0x89, 0x02); @@ -99,8 +98,7 @@ static int init_display(struct fbtft_par *par) write_reg(par, 0x1D, 0x07); write_reg(par, 0x1E, 0x00); write_reg(par, 0x1F, 0x09); - } else if ((par->info->var.xres == 640) && - (par->info->var.yres == 480)) { + } else if (par->info->var.xres == 640 && par->info->var.yres == 480) { /* PLL clock frequency */ write_reg(par, 0x88, 0x0B); write_reg(par, 0x89, 0x02); @@ -124,8 +122,7 @@ static int init_display(struct fbtft_par *par) write_reg(par, 0x1D, 0x0E); write_reg(par, 0x1E, 0x00); write_reg(par, 0x1F, 0x01); - } else if ((par->info->var.xres == 800) && - (par->info->var.yres == 480)) { + } else if (par->info->var.xres == 800 && par->info->var.yres == 480) { /* PLL clock frequency */ write_reg(par, 0x88, 0x0B); write_reg(par, 0x89, 0x02);