From patchwork Sun Mar 22 23:11:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michel von Czettritz X-Patchwork-Id: 6068071 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CA9A59F399 for ; Sun, 22 Mar 2015 23:11:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C9B812022D for ; Sun, 22 Mar 2015 23:11:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA1822021B for ; Sun, 22 Mar 2015 23:11:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751947AbbCVXLt (ORCPT ); Sun, 22 Mar 2015 19:11:49 -0400 Received: from mail-wg0-f50.google.com ([74.125.82.50]:33921 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751907AbbCVXLs (ORCPT ); Sun, 22 Mar 2015 19:11:48 -0400 Received: by wgs2 with SMTP id 2so25754613wgs.1; Sun, 22 Mar 2015 16:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=akRZK+MHGpIPHYuYQL8kGhjjFrJuUu0G3HgWxvoznEA=; b=nNQzSApfyQARYAc0UfcLOBkGLkFxqt9WMgGc0yjPw2ySzFmEastGdkT1iwT7DOHUG/ STqdXcKOLsAkqvLC00ujyzR21u+DGas4vr4wusF/mSfsQByguAdk9925OBe6WRjRfPj9 6d5QVPL7GDtxTyIdp7k4043YzjYgWV984Hhy5SD2sb5+XqUPCyYpQrOUEQxrr9MTxyGV EfTfKX0TIfsU1d2tD8LfbyvAKpAzP3IKS+Yu/F3fBbGEuV7YR818o5P/78t5rcWuyHgT 1aRGHCvGaf2DSWnQFdo5a+XtW6AKWuN0aN/jjRat4uk7PrGDcN3N70TFCp4hIJwNdWEM v2pA== X-Received: by 10.180.107.71 with SMTP id ha7mr14635679wib.23.1427065907117; Sun, 22 Mar 2015 16:11:47 -0700 (PDT) Received: from x230-arch (port-92-203-13-101.dynamic.qsc.de. [92.203.13.101]) by mx.google.com with ESMTPSA id g8sm8466328wiy.19.2015.03.22.16.11.45 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 22 Mar 2015 16:11:46 -0700 (PDT) Date: Mon, 23 Mar 2015 00:11:44 +0100 From: Michel von Czettritz To: sudipm.mukherjee@gmail.com Cc: teddy.wang@siliconmotion.com, kernel-janitors@vger.kernel.org, gregkh@linuxfoundation.org, linux-fbdev@vger.kernel.org Subject: [PATCH 03/13] staging: sm750: move '{' to previous line Message-ID: <20150322231144.GA17103@x230-arch.club.entropia.de> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix checkpatch.pl error: "ERROR: that open brace { should be on the previous line" Signed-off-by: Michel von Czettritz --- drivers/staging/sm750fb/sm750.c | 50 +++++++++++++---------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 83c81d2..24e7b68 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -171,8 +171,7 @@ static int lynxfb_ops_cursor(struct fb_info* info, struct fb_cursor* fbcursor) } - if(fbcursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE)) - { + if(fbcursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE)) { cursor->setData(cursor, fbcursor->rop, fbcursor->image.data, @@ -258,13 +257,10 @@ static void lynxfb_ops_imageblit(struct fb_info*info, const struct fb_image* ima if(image->depth == 1){ if(info->fix.visual == FB_VISUAL_TRUECOLOR || - info->fix.visual == FB_VISUAL_DIRECTCOLOR) - { + info->fix.visual == FB_VISUAL_DIRECTCOLOR) { fgcol = ((u32*)info->pseudo_palette)[image->fg_color]; bgcol = ((u32*)info->pseudo_palette)[image->bg_color]; - } - else - { + } else { fgcol = image->fg_color; bgcol = image->bg_color; } @@ -626,8 +622,7 @@ static int lynxfb_ops_setcolreg(unsigned regno, unsigned red, if(info->var.grayscale) red = green = blue = (red * 77 + green * 151 + blue * 28) >> 8; - if(var->bits_per_pixel == 8 && info->fix.visual == FB_VISUAL_PSEUDOCOLOR) - { + if(var->bits_per_pixel == 8 && info->fix.visual == FB_VISUAL_PSEUDOCOLOR) { red >>= 8; green >>= 8; blue >>= 8; @@ -636,13 +631,11 @@ static int lynxfb_ops_setcolreg(unsigned regno, unsigned red, } - if(info->fix.visual == FB_VISUAL_TRUECOLOR && regno < 256 ) - { + if(info->fix.visual == FB_VISUAL_TRUECOLOR && regno < 256 ) { u32 val; if(var->bits_per_pixel == 16 || var->bits_per_pixel == 32 || - var->bits_per_pixel == 24) - { + var->bits_per_pixel == 24) { val = chan_to_field(red, &var->red); val |= chan_to_field(green, &var->green); val |= chan_to_field(blue, &var->blue); @@ -705,8 +698,7 @@ static int sm750fb_set_drv(struct lynxfb_par * par) output->clear = hw_sm750_output_clear; /* chip specific phase */ share->accel.de_wait = (share->revid == SM750LE_REVISION_ID)?hw_sm750le_deWait: hw_sm750_deWait; - switch (spec_share->state.dataflow) - { + switch (spec_share->state.dataflow) { case sm750_simul_pri: output->paths = sm750_pnc; crtc->channel = sm750_primary; @@ -790,8 +782,7 @@ static int lynxfb_set_fbinfo(struct fb_info* info, int index) }; - static const char * fixId[2]= - { + static const char * fixId[2] = { "sm750_fb1", "sm750_fb2", }; @@ -931,8 +922,7 @@ static int lynxfb_set_fbinfo(struct fb_info* info, int index) pr_info("fix->mmio_start = %lx\n", fix->mmio_start); fix->mmio_len = share->vidreg_size; pr_info("fix->mmio_len = %x\n", fix->mmio_len); - switch(var->bits_per_pixel) - { + switch(var->bits_per_pixel) { case 8: fix->visual = FB_VISUAL_PSEUDOCOLOR; break; @@ -1024,8 +1014,7 @@ static void sm750fb_setup(struct lynx_share * share, char * src) g_hwcursor &= ~0x2; else if(!strncmp(opt, "nohwc", strlen("nohwc"))) g_hwcursor = 0; - else - { + else { if(!g_fbmode[0]){ g_fbmode[0] = opt; pr_info("find fbmode0 : %s\n", g_fbmode[0]); @@ -1038,8 +1027,7 @@ static void sm750fb_setup(struct lynx_share * share, char * src) } } #ifdef CAP_EXPANSION - if(getExpRes(exp_res, &spec_share->state.xLCD, &spec_share->state.yLCD)) - { + if(getExpRes(exp_res, &spec_share->state.xLCD, &spec_share->state.yLCD)) { /* seems exp_res is not valid*/ spec_share->state.xLCD = spec_share->state.yLCD = 0; } @@ -1047,8 +1035,7 @@ static void sm750fb_setup(struct lynx_share * share, char * src) NO_PARAM: if(share->revid != SM750LE_REVISION_ID){ - if(share->dual) - { + if(share->dual) { if(swap) spec_share->state.dataflow = sm750_dual_swap; else @@ -1164,16 +1151,13 @@ static int lynxfb_pci_probe(struct pci_dev * pdev, fbidx = 0; ALLOC_FB: info[fbidx] = framebuffer_alloc(sizeof(struct lynxfb_par), &pdev->dev); - if(!info[fbidx]) - { + if(!info[fbidx]) { pr_err("Could not allocate framebuffer #%d.\n", fbidx); if(fbidx == 0) goto err_info0_alloc; else goto err_info1_alloc; - } - else - { + } else { struct lynxfb_par * par; int errno; pr_info("framebuffer #%d alloc okay\n", fbidx); @@ -1292,8 +1276,7 @@ static int __init lynxfb_setup(char * options) strsep() updates @options to pointer after the first found token it also returns the pointer ahead the token. */ - while((opt = strsep(&options, ":"))!=NULL) - { + while((opt = strsep(&options, ":"))!=NULL) { /* options that mean for any lynx chips are configured here */ if(!strncmp(opt, "noaccel", strlen("noaccel"))) g_noaccel = 1; @@ -1303,8 +1286,7 @@ static int __init lynxfb_setup(char * options) #endif else if(!strncmp(opt, "dual", strlen("dual"))) g_dualview = 1; - else - { + else { strcat(tmp, opt); tmp += strlen(opt); if(options != NULL)