lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1339326744-17507-2-git-send-email-jmunhoz@igalia.com>
Date:	Sun, 10 Jun 2012 13:12:22 +0200
From:	"Javier M. Mellid" <jmunhoz@...lia.com>
To:	gregkh@...uxfoundation.org, teddy.wang@...iconmotion.com.cn
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	"Javier M. Mellid" <jmunhoz@...lia.com>
Subject: [PATCH 1/3] staging: sm7xx: code improvement

From: "Javier M. Mellid" <jmunhoz@...lia.com>

This patch simplifies code. It erases redundant code under little endian
compilations.

Signed-off-by: Javier M. Mellid <jmunhoz@...lia.com>
---
 drivers/staging/sm7xx/smtcfb.c |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c
index 746c4cd..2c172d6 100644
--- a/drivers/staging/sm7xx/smtcfb.c
+++ b/drivers/staging/sm7xx/smtcfb.c
@@ -724,16 +724,13 @@ static void smtc_unmap_mmio(struct smtcfb_info *sfb)
 static int smtc_map_smem(struct smtcfb_info *sfb,
 		struct pci_dev *pdev, u_long smem_len)
 {
-	if (sfb->fb.var.bits_per_pixel == 32) {
+
+	sfb->fb.fix.smem_start = pci_resource_start(pdev, 0);
+
 #ifdef __BIG_ENDIAN
-		sfb->fb.fix.smem_start = pci_resource_start(pdev, 0)
-			+ 0x800000;
-#else
-		sfb->fb.fix.smem_start = pci_resource_start(pdev, 0);
+	if (sfb->fb.var.bits_per_pixel == 32)
+		sfb->fb.fix.smem_start += 0x800000;
 #endif
-	} else {
-		sfb->fb.fix.smem_start = pci_resource_start(pdev, 0);
-	}
 
 	sfb->fb.fix.smem_len = smem_len;
 
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ