From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Oliver Neukum" <oliver@neukum.org>, "Bjørn Mork" <bjorn@mork.no>
Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] net: cdc_ncm: fix typo in test for supported formats
Date: Thu, 22 May 2014 10:52:29 +0300 [thread overview]
Message-ID: <20140522075229.GA4346@mwanda> (raw)
There is a typo here where we test for USB_CDC_NCM_NTH32_SIGN instead
of USB_CDC_NCM_NTB32_SUPPORTED. The test probably still works as
written because 0x686D636E has (1 << 1) set and doesn't have (1 << 0)
set.
Fixes: f8afb73da375 ('net: cdc_ncm: factor out one-time device initialization')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Static analysis. Untested. Applies on -next
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index ad2a386..93c9ca9 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -357,7 +357,8 @@ static int cdc_ncm_init(struct usbnet *dev)
* "The host shall only send this command while the NCM Data
* Interface is in alternate setting 0."
*/
- if (le16_to_cpu(ctx->ncm_parm.bmNtbFormatsSupported) & USB_CDC_NCM_NTH32_SIGN) {
+ if (le16_to_cpu(ctx->ncm_parm.bmNtbFormatsSupported) &
+ USB_CDC_NCM_NTB32_SUPPORTED) {
dev_dbg(&dev->intf->dev, "Setting NTB format to 16-bit\n");
err = usbnet_write_cmd(dev, USB_CDC_SET_NTB_FORMAT,
USB_TYPE_CLASS | USB_DIR_OUT
next reply other threads:[~2014-05-22 7:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 7:52 Dan Carpenter [this message]
2014-05-22 8:27 ` [patch] net: cdc_ncm: fix typo in test for supported formats Bjørn Mork
2014-05-22 19:53 ` David Miller
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=20140522075229.GA4346@mwanda \
--to=dan.carpenter@oracle.com \
--cc=bjorn@mork.no \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oliver@neukum.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).