Commit 65a602dd authored by John W. Linville's avatar John W. Linville

libertas: correct sparse warnings

  CHECK   drivers/net/wireless/libertas/cfg.c
drivers/net/wireless/libertas/cfg.c:493:19: warning: cast to restricted __le16
  CHECK   drivers/net/wireless/libertas/mesh.c
drivers/net/wireless/libertas/mesh.c:577:16: warning: incorrect type in assignment (different base types)
drivers/net/wireless/libertas/mesh.c:577:16:    expected restricted __le32 [addressable] [assigned] [usertype] id
drivers/net/wireless/libertas/mesh.c:577:16:    got bool
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9bad82b8
...@@ -479,7 +479,6 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy, ...@@ -479,7 +479,6 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
struct cmd_ds_802_11_scan_rsp *scanresp = (void *)resp; struct cmd_ds_802_11_scan_rsp *scanresp = (void *)resp;
int bsssize; int bsssize;
const u8 *pos; const u8 *pos;
u16 nr_sets;
const u8 *tsfdesc; const u8 *tsfdesc;
int tsfsize; int tsfsize;
int i; int i;
...@@ -488,12 +487,11 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy, ...@@ -488,12 +487,11 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
lbs_deb_enter(LBS_DEB_CFG80211); lbs_deb_enter(LBS_DEB_CFG80211);
bsssize = get_unaligned_le16(&scanresp->bssdescriptsize); bsssize = get_unaligned_le16(&scanresp->bssdescriptsize);
nr_sets = le16_to_cpu(scanresp->nr_sets);
lbs_deb_scan("scan response: %d BSSs (%d bytes); resp size %d bytes\n", lbs_deb_scan("scan response: %d BSSs (%d bytes); resp size %d bytes\n",
nr_sets, bsssize, le16_to_cpu(resp->size)); scanresp->nr_sets, bsssize, le16_to_cpu(resp->size));
if (nr_sets == 0) { if (scanresp->nr_sets == 0) {
ret = 0; ret = 0;
goto done; goto done;
} }
......
...@@ -574,7 +574,7 @@ int lbs_mesh_bt_set_inverted(struct lbs_private *priv, bool inverted) ...@@ -574,7 +574,7 @@ int lbs_mesh_bt_set_inverted(struct lbs_private *priv, bool inverted)
memset(&cmd, 0, sizeof(cmd)); memset(&cmd, 0, sizeof(cmd));
cmd.hdr.size = cpu_to_le16(sizeof(cmd)); cmd.hdr.size = cpu_to_le16(sizeof(cmd));
cmd.action = cpu_to_le16(CMD_ACT_BT_ACCESS_SET_INVERT); cmd.action = cpu_to_le16(CMD_ACT_BT_ACCESS_SET_INVERT);
cmd.id = !!inverted; cmd.id = cpu_to_le32(!!inverted);
ret = lbs_cmd_with_response(priv, CMD_BT_ACCESS, &cmd); ret = lbs_cmd_with_response(priv, CMD_BT_ACCESS, &cmd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment