Skip to contentSkip to conversation

video: fbdev: sm712fb.c: fixed constant-left comparison warning

PATCH In review Lynn Lei 2 participants 2 messages Jul 4, 2017 – Aug 1, 2017

Subsystems (2)
lore
Share & tools
lore

Lynn Lei

author
#0 lore raw

PATCH 4/4 video: fbdev: sm712fb.c: fixed constant-left comparison warning

Fixed a constant-left comparison warning issue check by scripts/checkpatch.pl:
WARNING: Comparisons should place the constant on the right side of the test

---
 drivers/video/fbdev/sm712fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/sm712fb.c +1 -1
index 172e94146878..502d0de2feec 100644
@@ -1478,7 +1478,7 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
 	}
 
 	/* can support 32 bpp */
-	if (15 = sfb->fb->var.bits_per_pixel)
+	if (sfb->fb->var.bits_per_pixel = 15)
 		sfb->fb->var.bits_per_pixel = 16;
 
 	sfb->fb->var.xres_virtual = sfb->fb->var.xres;
Signature · 1 line
2.13.2
#1 lore raw
Quoted 5 lines · Lynn Lei

Fixed a constant-left comparison warning issue check by scripts/checkpatch.pl:
WARNING: Comparisons should place the constant on the right side of the test

Patch queued for 4.14, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics