linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 06/12] staging: sm750: no braces for single stmt if blocks
@ 2015-03-26 22:25 Michel von Czettritz
  2015-03-27  6:00 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Michel von Czettritz @ 2015-03-26 22:25 UTC (permalink / raw)
  To: linux-fbdev

This patches fixes checkpatch.pl warning:
"WARNING: braces {} are not necessary for single statement blocks"

Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com>
---
 drivers/staging/sm750fb/sm750.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index d9a94d7..5d3ee44 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -131,9 +131,8 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
 	}
 
 	cursor->disable(cursor);
-	if (fbcursor->set & FB_CUR_SETSIZE) {
+	if (fbcursor->set & FB_CUR_SETSIZE)
 		cursor->setSize(cursor, fbcursor->image.width, fbcursor->image.height);
-	}
 
 	if (fbcursor->set & FB_CUR_SETPOS) {
 		cursor->setPos(cursor, fbcursor->image.dx - info->var.xoffset,
@@ -162,9 +161,8 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
 				fbcursor->mask);
 	}
 
-	if (fbcursor->enable) {
+	if (fbcursor->enable)
 		cursor->enable(cursor);
-	}
 
 	return 0;
 }
@@ -176,9 +174,8 @@ static void lynxfb_ops_fillrect(struct fb_info *info, const struct fb_fillrect *
 	unsigned int base, pitch, Bpp, rop;
 	u32 color;
 
-	if (info->state != FBINFO_STATE_RUNNING) {
+	if (info->state != FBINFO_STATE_RUNNING)
 		return;
-	}
 
 	par = info->par;
 	share = par->share;
@@ -487,8 +484,8 @@ static int lynxfb_resume(struct pci_dev *pdev)
 		par = info->par;
 		crtc = &par->crtc;
 		cursor = &crtc->cursor;
-		memset_io(cursor->vstart, 0x0, cursor->size);
-		memset_io(crtc->vScreen, 0x0, crtc->vidmem_size);
+		memset(cursor->vstart, 0x0, cursor->size);
+		memset(crtc->vScreen, 0x0, crtc->vidmem_size);
 		lynxfb_ops_set_par(info);
 		fb_set_suspend(info, 0);
 	}
-- 
2.3.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 06/12] staging: sm750: no braces for single stmt if blocks
  2015-03-26 22:25 [PATCH v2 06/12] staging: sm750: no braces for single stmt if blocks Michel von Czettritz
@ 2015-03-27  6:00 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2015-03-27  6:00 UTC (permalink / raw)
  To: linux-fbdev

On Thu, Mar 26, 2015 at 11:25:50PM +0100, Michel von Czettritz wrote:
> @@ -487,8 +484,8 @@ static int lynxfb_resume(struct pci_dev *pdev)
>  		par = info->par;
>  		crtc = &par->crtc;
>  		cursor = &crtc->cursor;
> -		memset_io(cursor->vstart, 0x0, cursor->size);
> -		memset_io(crtc->vScreen, 0x0, crtc->vidmem_size);
> +		memset(cursor->vstart, 0x0, cursor->size);
> +		memset(crtc->vScreen, 0x0, crtc->vidmem_size);
>  		lynxfb_ops_set_par(info);
>  		fb_set_suspend(info, 0);
>  	}

This is a bug.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-27  6:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26 22:25 [PATCH v2 06/12] staging: sm750: no braces for single stmt if blocks Michel von Czettritz
2015-03-27  6:00 ` Dan Carpenter

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).