From patchwork Wed Jun 17 11:24:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 6624161 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 023CF9F46A for ; Wed, 17 Jun 2015 11:25:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 24849208D7 for ; Wed, 17 Jun 2015 11:25:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 224A9208D0 for ; Wed, 17 Jun 2015 11:25:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753653AbbFQLZj (ORCPT ); Wed, 17 Jun 2015 07:25:39 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:36395 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754707AbbFQLZh (ORCPT ); Wed, 17 Jun 2015 07:25:37 -0400 Received: by paceq1 with SMTP id eq1so9530920pac.3; Wed, 17 Jun 2015 04:25:36 -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=xjeWkHi04ZVTzjHe7xn6dCq5iu7df1jb4ZEjc6v9DkLLwNCL4yFlsLUsWkmCZfnFd6 rPNbhf+81o6lQwpbGM8MRKqMcIDGYdGxqsrfJM7N2pfs9EGPVJ7ubhnWZcXkffRY5Oqk TWhMbEzRmGmDTDSXfFb4iykt2hd1vWuz/9p60yexiL6kYMuAD+FiR5LSxHumSaOwRrTf xm7b/yk2vYCPJNTOyNyXL4D+r/KdAi+V0m8qnRmxyGTPtgxLjf2rB+3J079n5jF779vP /utAgF+AcLg+FSacpcfqM1uCo+G8jF5S59debkeROzkyw94ljFnwoVn6BddOqnAV0WyC c9Zw== X-Received: by 10.68.89.164 with SMTP id bp4mr7288524pbb.41.1434540336393; Wed, 17 Jun 2015 04:25:36 -0700 (PDT) Received: from localhost.localdomain ([122.169.132.132]) by mx.google.com with ESMTPSA id zx1sm4367679pbb.73.2015.06.17.04.25.33 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Jun 2015 04:25:35 -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 v2 5/9] staging: sm7xxfb: fix alignment Date: Wed, 17 Jun 2015 16:54:44 +0530 Message-Id: <1434540288-8289-6-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1434540288-8289-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1434540288-8289-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.6 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=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 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);