From patchwork Tue Jun 16 13:42:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 6618041 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 5C7649F326 for ; Tue, 16 Jun 2015 13:43:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 82AEA2051A for ; Tue, 16 Jun 2015 13:42:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B2FA204F6 for ; Tue, 16 Jun 2015 13:42:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756601AbbFPNmo (ORCPT ); Tue, 16 Jun 2015 09:42:44 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:35063 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756597AbbFPNmj (ORCPT ); Tue, 16 Jun 2015 09:42:39 -0400 Received: by pdbnf5 with SMTP id nf5so14837506pdb.2; Tue, 16 Jun 2015 06:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=o6PDSud1H4SkMaSFjgJDirrssjqzWm2VkbKo9YQL4q8=; b=WkzbwUUvY6DDfH7OyXhaR2+cm2GFgVwJFCr+H7hUujzWmZw8AEGhSiOmjukMU6JXek wk/iRewa2luVddRvWhRCswdhCKf8ApJFz7hXGT4zoQYcqNG6VZsSlQ4sfbL+o9zcEGMK lXuOwQGEm9ji4M9yFfCyao69/nds2r8F8if/9yL4r9iGXdu8zuu1LJIs4PVFtlZvkYfT cIHnnGWy0gkoW3Y4+1ZAYmEibfMp+wQxH1/7YWbuZH/G9emnCZisuyRnFnbDiDWdfX5Z mC1GnuxEPJT/G7/54Z0Y2ngTU23DLFx6lAyJZPD6HwUdiC1gkon0mGxfyoMh02z3Rjva A0qQ== X-Received: by 10.66.165.67 with SMTP id yw3mr679146pab.95.1434462159500; Tue, 16 Jun 2015 06:42:39 -0700 (PDT) Received: from localhost.localdomain ([122.169.132.132]) by mx.google.com with ESMTPSA id w4sm1521423pdl.7.2015.06.16.06.42.36 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Jun 2015 06:42:38 -0700 (PDT) From: Sudip Mukherjee To: Greg Kroah-Hartman Cc: linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Joe Perches , Sudip Mukherjee Subject: [PATCH 5/8] staging: sm7xxfb: fix alignment Date: Tue, 16 Jun 2015 19:12:08 +0530 Message-Id: <1434462131-15191-5-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1434462131-15191-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1434462131-15191-1-git-send-email-sudipm.mukherjee@gmail.com> 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.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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 the alignment. Signed-off-by: Sudip Mukherjee --- drivers/staging/sm7xxfb/sm7xxfb.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c index c832399..6bdcd5b 100644 --- a/drivers/staging/sm7xxfb/sm7xxfb.c +++ b/drivers/staging/sm7xxfb/sm7xxfb.c @@ -302,8 +302,8 @@ static int smtc_setcolreg(unsigned regno, unsigned red, unsigned green, } #ifdef __BIG_ENDIAN -static ssize_t smtcfb_read(struct fb_info *info, char __user *buf, size_t - count, loff_t *ppos) +static ssize_t smtcfb_read(struct fb_info *info, char __user *buf, + size_t count, loff_t *ppos) { unsigned long p = *ppos; @@ -346,9 +346,8 @@ static ssize_t smtcfb_read(struct fb_info *info, char __user *buf, size_t dst = buffer; for (i = c >> 2; i--;) { *dst = fb_readl(src++); - *dst = - (*dst & 0xff00ff00 >> 8) | - (*dst & 0x00ff00ff << 8); + *dst = (*dst & 0xff00ff00 >> 8) | + (*dst & 0x00ff00ff << 8); dst++; } if (c & 3) { @@ -381,9 +380,8 @@ static ssize_t smtcfb_read(struct fb_info *info, char __user *buf, size_t return (err) ? err : cnt; } -static ssize_t -smtcfb_write(struct fb_info *info, const char __user *buf, size_t count, - loff_t *ppos) +static ssize_t smtcfb_write(struct fb_info *info, const char __user *buf, + size_t count, loff_t *ppos) { unsigned long p = *ppos; @@ -552,8 +550,7 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb) writel(0x0, sfb->vp_regs + 0x40); /* set data width */ - m_nscreenstride = - (sfb->width * sfb->fb->var.bits_per_pixel) / 64; + m_nscreenstride = (sfb->width * sfb->fb->var.bits_per_pixel) / 64; switch (sfb->fb->var.bits_per_pixel) { case 8: writel(0x0, sfb->vp_regs + 0x0);