提交 e0721f99 编写于 作者: M Marcel Holtmann

Bluetooth: Fix last few compiler warning within Marvell core driver

After fixing the driver to use skb_put properly for their HCI commands
only a few compiler warnings are left. Add proper casting for them.
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 91d69730
...@@ -172,7 +172,7 @@ int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd) ...@@ -172,7 +172,7 @@ int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd)
goto exit; goto exit;
} }
cmd = skb_put(skb, sizeof(*cmd)); cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd));
cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, BT_CMD_MODULE_CFG_REQ)); cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, BT_CMD_MODULE_CFG_REQ));
cmd->length = 1; cmd->length = 1;
cmd->data[0] = subcmd; cmd->data[0] = subcmd;
...@@ -222,7 +222,7 @@ static int btmrvl_enable_hs(struct btmrvl_private *priv) ...@@ -222,7 +222,7 @@ static int btmrvl_enable_hs(struct btmrvl_private *priv)
goto exit; goto exit;
} }
cmd = skb_put(skb, sizeof(*cmd)); cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd));
cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, BT_CMD_HOST_SLEEP_ENABLE)); cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, BT_CMD_HOST_SLEEP_ENABLE));
cmd->length = 0; cmd->length = 0;
...@@ -268,7 +268,7 @@ int btmrvl_prepare_command(struct btmrvl_private *priv) ...@@ -268,7 +268,7 @@ int btmrvl_prepare_command(struct btmrvl_private *priv)
goto exit; goto exit;
} }
cmd = skb_put(skb, sizeof(*cmd)); cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd));
cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, BT_CMD_HOST_SLEEP_CONFIG)); cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, BT_CMD_HOST_SLEEP_CONFIG));
cmd->length = 2; cmd->length = 2;
cmd->data[0] = (priv->btmrvl_dev.gpio_gap & 0xff00) >> 8; cmd->data[0] = (priv->btmrvl_dev.gpio_gap & 0xff00) >> 8;
...@@ -293,7 +293,7 @@ int btmrvl_prepare_command(struct btmrvl_private *priv) ...@@ -293,7 +293,7 @@ int btmrvl_prepare_command(struct btmrvl_private *priv)
goto exit; goto exit;
} }
cmd = skb_put(skb, sizeof(*cmd)); cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd));
cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, BT_CMD_AUTO_SLEEP_MODE)); cmd->ocf_ogf = cpu_to_le16(hci_opcode_pack(OGF, BT_CMD_AUTO_SLEEP_MODE));
cmd->length = 1; cmd->length = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册