[PATCH 1/4] net usb asix: Simplify condition in rx_fixup()

Philipp Zabel philipp.zabel at gmail.com
Wed Jan 22 17:50:46 EST 2014


From: Marek Vasut <marek.vasut at gmail.com>

Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
Signed-off-by: Philipp Zabel <philipp.zabel at gmail.com>
---
 drivers/net/usb/asix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 5975e2a..8b73bf9 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -408,7 +408,7 @@ static int asix_rx_fixup(struct usbnet *dev, void *buf, int len)
 	len -= 4;
 
 	while (len > 0) {
-		if ((short)(header & 0x0000ffff) != ~((short)((header & 0xffff0000) >> 16)))
+		if ((header & 0xffff) != ((~header >> 16) & 0xffff))
 			dev_err(&dev->edev.dev, "asix_rx_fixup() Bad Header Length\n");
 
 		/* get the packet length */
-- 
1.8.5.3




More information about the barebox mailing list