netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn-yOkvZcmFvRU@public.gmane.org>
To: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"Oliver Neukum" <oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>,
	"Bjørn Mork" <bjorn-yOkvZcmFvRU@public.gmane.org>
Subject: [PATCH net-next] net: sierra: shut up sparse restricted type warnings
Date: Fri, 26 Oct 2012 09:44:07 +0200	[thread overview]
Message-ID: <1351237449-23643-1-git-send-email-bjorn@mork.no> (raw)

Removes the warnings

 drivers/net/usb/sierra_net.c:343:45: warning: incorrect type in assignment (different base types)
 drivers/net/usb/sierra_net.c:343:45:    expected unsigned short [unsigned] [short] [usertype] <noident>
 drivers/net/usb/sierra_net.c:343:45:    got restricted __be16 [usertype] <noident>

and

 drivers/net/usb/sierra_net.c:658:18: warning: cast to restricted __le16

Signed-off-by: Bjørn Mork <bjorn-yOkvZcmFvRU@public.gmane.org>
---
 drivers/net/usb/sierra_net.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c
index c27d277..2c3b82e 100644
--- a/drivers/net/usb/sierra_net.c
+++ b/drivers/net/usb/sierra_net.c
@@ -340,7 +340,7 @@ static void sierra_net_set_ctx_index(struct sierra_net_data *priv, u8 ctx_ix)
 	dev_dbg(&(priv->usbnet->udev->dev), "%s %d", __func__, ctx_ix);
 	priv->tx_hdr_template[0] = 0x3F;
 	priv->tx_hdr_template[1] = ctx_ix;
-	*((u16 *)&priv->tx_hdr_template[2]) =
+	*((__be16 *)&priv->tx_hdr_template[2]) =
 		cpu_to_be16(SIERRA_NET_HIP_EXT_IP_OUT_ID);
 }
 
@@ -632,7 +632,7 @@ static int sierra_net_change_mtu(struct net_device *net, int new_mtu)
 static int sierra_net_get_fw_attr(struct usbnet *dev, u16 *datap)
 {
 	int result = 0;
-	u16 *attrdata;
+	__le16 *attrdata;
 
 	attrdata = kmalloc(sizeof(*attrdata), GFP_KERNEL);
 	if (!attrdata)
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2012-10-26  7:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-26  7:44 Bjørn Mork [this message]
2012-10-26  7:44 ` [PATCH net-next] net: cdc_ncm: error path lock fix Bjørn Mork
     [not found]   ` <1351237449-23643-3-git-send-email-bjorn-yOkvZcmFvRU@public.gmane.org>
2012-10-28 23:08     ` David Miller
     [not found] ` <1351237449-23643-1-git-send-email-bjorn-yOkvZcmFvRU@public.gmane.org>
2012-10-26  7:44   ` [PATCH net-next] net: cdc_ncm: big endian fix Bjørn Mork
2012-10-28 23:08     ` David Miller
2012-10-26  8:15   ` [PATCH v2 net-next] net: sierra: shut up sparse restricted type warnings Bjørn Mork
2012-10-28 23:09   ` [PATCH " 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=1351237449-23643-1-git-send-email-bjorn@mork.no \
    --to=bjorn-yokvzcmfvru@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.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).