Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=073d3f46e5ccc49ede1d3487ed1e71d63d71b750 Commit: 073d3f46e5ccc49ede1d3487ed1e71d63d71b750 Parent: d39cb7866e5f6ff32ed4d99cc3fcd19bda701492 Author: Ben Dooks <[EMAIL PROTECTED]> AuthorDate: Tue Feb 5 00:02:19 2008 +0000 Committer: Jeff Garzik <[EMAIL PROTECTED]> CommitDate: Mon Feb 11 11:06:34 2008 -0500
DM9000: Remove redudant use of "& 0xff" The writing of the data should implicitly truncate the data to 8bits, so do not bother with the ands in the code. Signed-off-by: Ben Dooks <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/dm9000.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 2259605..d0cd7f9 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c @@ -814,8 +814,8 @@ dm9000_start_xmit(struct sk_buff *skb, struct net_device *dev) /* TX control: First packet immediately send, second packet queue */ if (db->tx_pkt_cnt == 1) { /* Set TX length to DM9000 */ - iow(db, DM9000_TXPLL, skb->len & 0xff); - iow(db, DM9000_TXPLH, (skb->len >> 8) & 0xff); + iow(db, DM9000_TXPLL, skb->len); + iow(db, DM9000_TXPLH, skb->len >> 8); /* Issue TX polling command */ iow(db, DM9000_TCR, TCR_TXREQ); /* Cleared after TX complete */ @@ -890,8 +890,8 @@ dm9000_tx_done(struct net_device *dev, board_info_t * db) /* Queue packet check & send */ if (db->tx_pkt_cnt > 0) { - iow(db, DM9000_TXPLL, db->queue_pkt_len & 0xff); - iow(db, DM9000_TXPLH, (db->queue_pkt_len >> 8) & 0xff); + iow(db, DM9000_TXPLL, db->queue_pkt_len); + iow(db, DM9000_TXPLH, db->queue_pkt_len >> 8); iow(db, DM9000_TCR, TCR_TXREQ); dev->trans_start = jiffies; } @@ -1275,8 +1275,8 @@ dm9000_phy_write(struct net_device *dev, int phyaddr_unused, int reg, int value) iow(db, DM9000_EPAR, DM9000_PHY | reg); /* Fill the written data into REG_0D & REG_0E */ - iow(db, DM9000_EPDRL, (value & 0xff)); - iow(db, DM9000_EPDRH, ((value >> 8) & 0xff)); + iow(db, DM9000_EPDRL, value); + iow(db, DM9000_EPDRH, value >> 8); iow(db, DM9000_EPCR, 0xa); /* Issue phyxcer write command */ - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html