LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] staging: ft1000: Remove unnecessary check in write_blk_fifo().
@ 2011-02-08 13:41 Marek Belisko
  0 siblings, 0 replies; only message in thread
From: Marek Belisko @ 2011-02-08 13:41 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel, Marek Belisko

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-08 13:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-08 13:41 [PATCH] staging: ft1000: Remove unnecessary check in write_blk_fifo() Marek Belisko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).