Skip to content

Commit

Permalink
tx4939ide: typo fix and minor cleanup
Browse files Browse the repository at this point in the history
The bcount is greater than 0 and less than or equal to 0x10000.
Thus '(bcount & 0xffff) == 0x0000' can be simplified as 'bcount == 0x10000'.

Suggested-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Atsushi Nemoto authored and Bartlomiej Zolnierkiewicz committed Feb 2, 2009
1 parent a77dcc4 commit 9711a53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ide/tx4939ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ static int tx4939ide_build_dmatable(ide_drive_t *drive, struct request *rq)
bcount = cur_len;
/*
* This workaround for zero count seems required.
* (standard ide_build_dmatable do it too)
* (standard ide_build_dmatable does it too)
*/
if ((bcount & 0xffff) == 0x0000)
if (bcount == 0x10000)
bcount = 0x8000;
*table++ = bcount & 0xffff;
*table++ = cur_addr;
Expand Down

0 comments on commit 9711a53

Please sign in to comment.