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>] [day] [month] [year] [list]
Message-Id: <1297172498-7366-1-git-send-email-marek.belisko@open-nandra.com>
Date:	Tue,  8 Feb 2011 14:41:38 +0100
From:	Marek Belisko <marek.belisko@...n-nandra.com>
To:	gregkh@...e.de
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Marek Belisko <marek.belisko@...n-nandra.com>
Subject: [PATCH] staging: ft1000: Remove unnecessary check in write_blk_fifo().

byte_length = word_length * 4;

if (byte_length % 4) ...

word_length * 4 is always aligned at 4 bytes. Remove pointless
check.

Signed-off-by: Marek Belisko <marek.belisko@...n-nandra.com>
---
 .../staging/ft1000/ft1000-usb/ft1000_download.c    |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index 1797c4d..8e62242 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -644,16 +644,9 @@ static u32 write_blk_fifo(struct ft1000_device *ft1000dev, u16 **pUsFile,
 {
 	u32 Status = STATUS_SUCCESS;
 	int byte_length;
-	long aligncnt;
 
 	byte_length = word_length * 4;
 
-	if (byte_length % 4)
-		aligncnt = 4 - (byte_length % 4);
-	else
-		aligncnt = 0;
-	byte_length += aligncnt;
-
 	if (byte_length && ((byte_length % 64) == 0))
 		byte_length += 4;
 
-- 
1.7.1

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