From 45b6b65c6bf06a589ef3123192af94b0381db27b Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Wed, 11 Nov 2009 10:03:09 +0200 Subject: smc911x: fix typo in smc911x_handle_mac_address name Signed-off-by: Mike Rapoport --- drivers/net/smc911x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index c027abe9f..5d51406f6 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -37,7 +37,7 @@ void pkt_data_push(struct eth_device *dev, u32 addr, u32 val) \ #define mdelay(n) udelay((n)*1000) -static void smx911x_handle_mac_address(struct eth_device *dev) +static void smc911x_handle_mac_address(struct eth_device *dev) { unsigned long addrh, addrl; uchar *m = dev->enetaddr; @@ -155,7 +155,7 @@ static int smc911x_init(struct eth_device *dev, bd_t * bd) /* Configure the PHY, initialize the link state */ smc911x_phy_configure(dev); - smx911x_handle_mac_address(dev); + smc911x_handle_mac_address(dev); /* Turn on Tx + Rx */ smc911x_enable(dev); -- cgit v1.2.3 From 0ec81db20294efdad2454a753e79f1fe244a43ca Mon Sep 17 00:00:00 2001 From: Daniel Hobi Date: Tue, 1 Dec 2009 14:05:55 +0100 Subject: Fix computation in nand_util.c:get_len_incl_bad Depending on offset, flash size and the number of bad blocks, get_len_incl_bad may return a too small value which may lead to: 1) If there are no bad blocks, nand_{read,write}_skip_bad chooses the bad block aware read/write code. This may hurt performance, but does not have any adverse effects. 2) If there are bad blocks, the nand_{read,write}_skip_bad may choose the bad block unaware read/write code (if len_incl_bad == *length) which leads to corrupted data. Signed-off-by: Daniel Hobi --- drivers/mtd/nand/nand_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c index bec927706..7085d42cc 100644 --- a/drivers/mtd/nand/nand_util.c +++ b/drivers/mtd/nand/nand_util.c @@ -452,7 +452,7 @@ static size_t get_len_incl_bad (nand_info_t *nand, loff_t offset, len_incl_bad += block_len; offset += block_len; - if ((offset + len_incl_bad) >= nand->size) + if (offset >= nand->size) break; } -- cgit v1.2.3