* [PATCH] staging: fbtft: Removed unnecessary parenthesis around conditions to comply with the checkpatch coding style.
@ 2023-09-13 1:02 Angus Gardner
2023-09-13 1:32 ` Bagas Sanjaya
0 siblings, 1 reply; 3+ messages in thread
From: Angus Gardner @ 2023-09-13 1:02 UTC (permalink / raw)
To: Greg Kroah-Hartman, dri-devel, linux-fbdev, linux-staging,
linux-kernel
---
drivers/staging/fbtft/fb_ra8875.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
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);
--
2.40.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] staging: fbtft: Removed unnecessary parenthesis around conditions to comply with the checkpatch coding style.
2023-09-13 1:02 [PATCH] staging: fbtft: Removed unnecessary parenthesis around conditions to comply with the checkpatch coding style Angus Gardner
@ 2023-09-13 1:32 ` Bagas Sanjaya
[not found] ` <CAC5tM5u8L50fAhReAmP0dqexSmv-PdZJKa_ES2hxZMp41MJjGQ@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Bagas Sanjaya @ 2023-09-13 1:32 UTC (permalink / raw)
To: Angus Gardner, Greg Kroah-Hartman, dri-devel, linux-fbdev,
linux-staging, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 711 bytes --]
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/
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-15 7:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-13 1:02 [PATCH] staging: fbtft: Removed unnecessary parenthesis around conditions to comply with the checkpatch coding style Angus Gardner
2023-09-13 1:32 ` Bagas Sanjaya
[not found] ` <CAC5tM5u8L50fAhReAmP0dqexSmv-PdZJKa_ES2hxZMp41MJjGQ@mail.gmail.com>
2023-09-15 7:56 ` Bagas Sanjaya
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).