All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Zabel <philipp.zabel@gmail.com>
To: barebox@lists.infradead.org
Cc: Marek Vasut <marek.vasut@gmail.com>
Subject: [PATCH 1/4] net usb asix: Simplify condition in rx_fixup()
Date: Wed, 22 Jan 2014 23:50:46 +0100	[thread overview]
Message-ID: <1390431049-4236-2-git-send-email-philipp.zabel@gmail.com> (raw)
In-Reply-To: <1390431049-4236-1-git-send-email-philipp.zabel@gmail.com>

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

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Philipp Zabel <philipp.zabel@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-01-22 22:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22 22:50 [PATCH 0/4] Asix AX88772B support Philipp Zabel
2014-01-22 22:50 ` Philipp Zabel [this message]
2014-01-22 22:50 ` [PATCH 2/4] net usb asix: Use only 11 bits of header for data size Philipp Zabel
2014-01-23  1:14 ` [PATCH 0/4] Asix AX88772B support Marek Vasut
2014-01-23  9:30   ` Sascha Hauer
2014-01-27  8:34 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1390431049-4236-2-git-send-email-philipp.zabel@gmail.com \
    --to=philipp.zabel@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.