Skip to content

Commit

Permalink
net: sierra: shut up sparse restricted type warnings
Browse files Browse the repository at this point in the history
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@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Bjørn Mork authored and David S. Miller committed Oct 28, 2012
1 parent 7b1e0cb commit a932657
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/usb/sierra_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,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);
}

Expand Down Expand Up @@ -631,7 +631,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;

result = usbnet_read_cmd(dev,
/* _u8 vendor specific request */
Expand Down

0 comments on commit a932657

Please sign in to comment.