Commit d6e71dd1 authored by Wu Yunchuan's avatar Wu Yunchuan Committed by Kalle Valo

wifi: ath9k: Remove unnecessary (void*) conversions

No need cast (void *) to (struct owl_ctx *), (struct ath_hw *),
(struct cmd_buf *) or other types.
Signed-off-by: default avatarWu Yunchuan <yunchuan@nfschina.com>
Reviewed-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
Acked-by: default avatarToke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230919045226.524544-1-yunchuan@nfschina.com
parent 9f1eebf0
...@@ -125,7 +125,7 @@ static void owl_rescan(struct pci_dev *pdev) ...@@ -125,7 +125,7 @@ static void owl_rescan(struct pci_dev *pdev)
static void owl_fw_cb(const struct firmware *fw, void *context) static void owl_fw_cb(const struct firmware *fw, void *context)
{ {
struct owl_ctx *ctx = (struct owl_ctx *)context; struct owl_ctx *ctx = context;
complete(&ctx->eeprom_load); complete(&ctx->eeprom_load);
......
...@@ -124,7 +124,7 @@ static struct ieee80211_rate ath9k_legacy_rates[] = { ...@@ -124,7 +124,7 @@ static struct ieee80211_rate ath9k_legacy_rates[] = {
int ath9k_cmn_init_channels_rates(struct ath_common *common) int ath9k_cmn_init_channels_rates(struct ath_common *common)
{ {
struct ath_hw *ah = (struct ath_hw *)common->ah; struct ath_hw *ah = common->ah;
void *channels; void *channels;
BUILD_BUG_ON(ARRAY_SIZE(ath9k_2ghz_chantable) + BUILD_BUG_ON(ARRAY_SIZE(ath9k_2ghz_chantable) +
......
...@@ -471,7 +471,7 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h ...@@ -471,7 +471,7 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h
u8 sample_buf[SPECTRAL_SAMPLE_MAX_LEN] = {0}; u8 sample_buf[SPECTRAL_SAMPLE_MAX_LEN] = {0};
struct ath_hw *ah = spec_priv->ah; struct ath_hw *ah = spec_priv->ah;
struct ath_common *common = ath9k_hw_common(spec_priv->ah); struct ath_common *common = ath9k_hw_common(spec_priv->ah);
struct ath_softc *sc = (struct ath_softc *)common->priv; struct ath_softc *sc = common->priv;
u8 num_bins, *vdata = (u8 *)hdr; u8 num_bins, *vdata = (u8 *)hdr;
struct ath_radar_info *radar_info; struct ath_radar_info *radar_info;
int len = rs->rs_datalen; int len = rs->rs_datalen;
......
...@@ -1376,7 +1376,7 @@ void ath9k_deinit_debug(struct ath_softc *sc) ...@@ -1376,7 +1376,7 @@ void ath9k_deinit_debug(struct ath_softc *sc)
int ath9k_init_debug(struct ath_hw *ah) int ath9k_init_debug(struct ath_hw *ah)
{ {
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath_softc *sc = (struct ath_softc *) common->priv; struct ath_softc *sc = common->priv;
sc->debug.debugfs_phy = debugfs_create_dir("ath9k", sc->debug.debugfs_phy = debugfs_create_dir("ath9k",
sc->hw->wiphy->debugfsdir); sc->hw->wiphy->debugfsdir);
......
...@@ -70,7 +70,7 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev); ...@@ -70,7 +70,7 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev);
static void hif_usb_regout_cb(struct urb *urb) static void hif_usb_regout_cb(struct urb *urb)
{ {
struct cmd_buf *cmd = (struct cmd_buf *)urb->context; struct cmd_buf *cmd = urb->context;
switch (urb->status) { switch (urb->status) {
case 0: case 0:
...@@ -134,7 +134,7 @@ static int hif_usb_send_regout(struct hif_device_usb *hif_dev, ...@@ -134,7 +134,7 @@ static int hif_usb_send_regout(struct hif_device_usb *hif_dev,
static void hif_usb_mgmt_cb(struct urb *urb) static void hif_usb_mgmt_cb(struct urb *urb)
{ {
struct cmd_buf *cmd = (struct cmd_buf *)urb->context; struct cmd_buf *cmd = urb->context;
struct hif_device_usb *hif_dev; struct hif_device_usb *hif_dev;
unsigned long flags; unsigned long flags;
bool txok = true; bool txok = true;
...@@ -252,7 +252,7 @@ static inline void ath9k_skb_queue_complete(struct hif_device_usb *hif_dev, ...@@ -252,7 +252,7 @@ static inline void ath9k_skb_queue_complete(struct hif_device_usb *hif_dev,
static void hif_usb_tx_cb(struct urb *urb) static void hif_usb_tx_cb(struct urb *urb)
{ {
struct tx_buf *tx_buf = (struct tx_buf *) urb->context; struct tx_buf *tx_buf = urb->context;
struct hif_device_usb *hif_dev; struct hif_device_usb *hif_dev;
bool txok = true; bool txok = true;
...@@ -687,7 +687,7 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev, ...@@ -687,7 +687,7 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev,
static void ath9k_hif_usb_rx_cb(struct urb *urb) static void ath9k_hif_usb_rx_cb(struct urb *urb)
{ {
struct rx_buf *rx_buf = (struct rx_buf *)urb->context; struct rx_buf *rx_buf = urb->context;
struct hif_device_usb *hif_dev = rx_buf->hif_dev; struct hif_device_usb *hif_dev = rx_buf->hif_dev;
struct sk_buff *skb = rx_buf->skb; struct sk_buff *skb = rx_buf->skb;
int ret; int ret;
...@@ -734,7 +734,7 @@ static void ath9k_hif_usb_rx_cb(struct urb *urb) ...@@ -734,7 +734,7 @@ static void ath9k_hif_usb_rx_cb(struct urb *urb)
static void ath9k_hif_usb_reg_in_cb(struct urb *urb) static void ath9k_hif_usb_reg_in_cb(struct urb *urb)
{ {
struct rx_buf *rx_buf = (struct rx_buf *)urb->context; struct rx_buf *rx_buf = urb->context;
struct hif_device_usb *hif_dev = rx_buf->hif_dev; struct hif_device_usb *hif_dev = rx_buf->hif_dev;
struct sk_buff *skb = rx_buf->skb; struct sk_buff *skb = rx_buf->skb;
int ret; int ret;
......
...@@ -482,7 +482,7 @@ void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv) ...@@ -482,7 +482,7 @@ void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv)
int ath9k_htc_init_debug(struct ath_hw *ah) int ath9k_htc_init_debug(struct ath_hw *ah)
{ {
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
priv->debug.debugfs_phy = debugfs_create_dir(KBUILD_MODNAME, priv->debug.debugfs_phy = debugfs_create_dir(KBUILD_MODNAME,
priv->hw->wiphy->debugfsdir); priv->hw->wiphy->debugfsdir);
......
...@@ -63,12 +63,12 @@ static const struct ieee80211_tpt_blink ath9k_htc_tpt_blink[] = { ...@@ -63,12 +63,12 @@ static const struct ieee80211_tpt_blink ath9k_htc_tpt_blink[] = {
static void ath9k_htc_op_ps_wakeup(struct ath_common *common) static void ath9k_htc_op_ps_wakeup(struct ath_common *common)
{ {
ath9k_htc_ps_wakeup((struct ath9k_htc_priv *) common->priv); ath9k_htc_ps_wakeup(common->priv);
} }
static void ath9k_htc_op_ps_restore(struct ath_common *common) static void ath9k_htc_op_ps_restore(struct ath_common *common)
{ {
ath9k_htc_ps_restore((struct ath9k_htc_priv *) common->priv); ath9k_htc_ps_restore(common->priv);
} }
static const struct ath_ps_ops ath9k_htc_ps_ops = { static const struct ath_ps_ops ath9k_htc_ps_ops = {
...@@ -235,7 +235,7 @@ static unsigned int ath9k_regread(void *hw_priv, u32 reg_offset) ...@@ -235,7 +235,7 @@ static unsigned int ath9k_regread(void *hw_priv, u32 reg_offset)
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
__be32 val, reg = cpu_to_be32(reg_offset); __be32 val, reg = cpu_to_be32(reg_offset);
int r; int r;
...@@ -257,7 +257,7 @@ static void ath9k_multi_regread(void *hw_priv, u32 *addr, ...@@ -257,7 +257,7 @@ static void ath9k_multi_regread(void *hw_priv, u32 *addr,
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
__be32 tmpaddr[8]; __be32 tmpaddr[8];
__be32 tmpval[8]; __be32 tmpval[8];
int i, ret; int i, ret;
...@@ -282,7 +282,7 @@ static void ath9k_multi_regread(void *hw_priv, u32 *addr, ...@@ -282,7 +282,7 @@ static void ath9k_multi_regread(void *hw_priv, u32 *addr,
static void ath9k_regwrite_multi(struct ath_common *common) static void ath9k_regwrite_multi(struct ath_common *common)
{ {
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
u32 rsp_status; u32 rsp_status;
int r; int r;
...@@ -303,7 +303,7 @@ static void ath9k_regwrite_single(void *hw_priv, u32 val, u32 reg_offset) ...@@ -303,7 +303,7 @@ static void ath9k_regwrite_single(void *hw_priv, u32 val, u32 reg_offset)
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
const __be32 buf[2] = { const __be32 buf[2] = {
cpu_to_be32(reg_offset), cpu_to_be32(reg_offset),
cpu_to_be32(val), cpu_to_be32(val),
...@@ -324,7 +324,7 @@ static void ath9k_regwrite_buffer(void *hw_priv, u32 val, u32 reg_offset) ...@@ -324,7 +324,7 @@ static void ath9k_regwrite_buffer(void *hw_priv, u32 val, u32 reg_offset)
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
mutex_lock(&priv->wmi->multi_write_mutex); mutex_lock(&priv->wmi->multi_write_mutex);
...@@ -347,7 +347,7 @@ static void ath9k_regwrite(void *hw_priv, u32 val, u32 reg_offset) ...@@ -347,7 +347,7 @@ static void ath9k_regwrite(void *hw_priv, u32 val, u32 reg_offset)
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
if (atomic_read(&priv->wmi->mwrite_cnt)) if (atomic_read(&priv->wmi->mwrite_cnt))
ath9k_regwrite_buffer(hw_priv, val, reg_offset); ath9k_regwrite_buffer(hw_priv, val, reg_offset);
...@@ -359,7 +359,7 @@ static void ath9k_enable_regwrite_buffer(void *hw_priv) ...@@ -359,7 +359,7 @@ static void ath9k_enable_regwrite_buffer(void *hw_priv)
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
atomic_inc(&priv->wmi->mwrite_cnt); atomic_inc(&priv->wmi->mwrite_cnt);
} }
...@@ -368,7 +368,7 @@ static void ath9k_regwrite_flush(void *hw_priv) ...@@ -368,7 +368,7 @@ static void ath9k_regwrite_flush(void *hw_priv)
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
atomic_dec(&priv->wmi->mwrite_cnt); atomic_dec(&priv->wmi->mwrite_cnt);
...@@ -385,7 +385,7 @@ static void ath9k_reg_rmw_buffer(void *hw_priv, ...@@ -385,7 +385,7 @@ static void ath9k_reg_rmw_buffer(void *hw_priv,
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
u32 rsp_status; u32 rsp_status;
int r; int r;
...@@ -423,7 +423,7 @@ static void ath9k_reg_rmw_flush(void *hw_priv) ...@@ -423,7 +423,7 @@ static void ath9k_reg_rmw_flush(void *hw_priv)
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
u32 rsp_status; u32 rsp_status;
int r; int r;
...@@ -455,7 +455,7 @@ static void ath9k_enable_rmw_buffer(void *hw_priv) ...@@ -455,7 +455,7 @@ static void ath9k_enable_rmw_buffer(void *hw_priv)
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
if (test_bit(HTC_FWFLAG_NO_RMW, &priv->fw_flags)) if (test_bit(HTC_FWFLAG_NO_RMW, &priv->fw_flags))
return; return;
...@@ -468,7 +468,7 @@ static void ath9k_reg_rmw_single(void *hw_priv, ...@@ -468,7 +468,7 @@ static void ath9k_reg_rmw_single(void *hw_priv,
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
struct register_rmw buf, buf_ret; struct register_rmw buf, buf_ret;
int ret; int ret;
...@@ -490,7 +490,7 @@ static u32 ath9k_reg_rmw(void *hw_priv, u32 reg_offset, u32 set, u32 clr) ...@@ -490,7 +490,7 @@ static u32 ath9k_reg_rmw(void *hw_priv, u32 reg_offset, u32 set, u32 clr)
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv; struct ath9k_htc_priv *priv = common->priv;
if (test_bit(HTC_FWFLAG_NO_RMW, &priv->fw_flags)) { if (test_bit(HTC_FWFLAG_NO_RMW, &priv->fw_flags)) {
u32 val; u32 val;
...@@ -518,7 +518,7 @@ static void ath_usb_read_cachesize(struct ath_common *common, int *csz) ...@@ -518,7 +518,7 @@ static void ath_usb_read_cachesize(struct ath_common *common, int *csz)
static bool ath_usb_eeprom_read(struct ath_common *common, u32 off, u16 *data) static bool ath_usb_eeprom_read(struct ath_common *common, u32 off, u16 *data)
{ {
struct ath_hw *ah = (struct ath_hw *) common->ah; struct ath_hw *ah = common->ah;
(void)REG_READ(ah, AR5416_EEPROM_OFFSET + (off << AR5416_EEPROM_S)); (void)REG_READ(ah, AR5416_EEPROM_OFFSET + (off << AR5416_EEPROM_S));
...@@ -970,7 +970,7 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev, ...@@ -970,7 +970,7 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,
err_init: err_init:
ath9k_stop_wmi(priv); ath9k_stop_wmi(priv);
hif_dev = (struct hif_device_usb *)htc_handle->hif_dev; hif_dev = htc_handle->hif_dev;
ath9k_hif_usb_dealloc_urbs(hif_dev); ath9k_hif_usb_dealloc_urbs(hif_dev);
ath9k_destroy_wmi(priv); ath9k_destroy_wmi(priv);
err_free: err_free:
...@@ -988,7 +988,7 @@ void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug) ...@@ -988,7 +988,7 @@ void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug)
ath9k_deinit_device(htc_handle->drv_priv); ath9k_deinit_device(htc_handle->drv_priv);
ath9k_stop_wmi(htc_handle->drv_priv); ath9k_stop_wmi(htc_handle->drv_priv);
ath9k_hif_usb_dealloc_urbs((struct hif_device_usb *)htc_handle->hif_dev); ath9k_hif_usb_dealloc_urbs(htc_handle->hif_dev);
ath9k_destroy_wmi(htc_handle->drv_priv); ath9k_destroy_wmi(htc_handle->drv_priv);
ieee80211_free_hw(htc_handle->drv_priv->hw); ieee80211_free_hw(htc_handle->drv_priv->hw);
} }
......
...@@ -89,7 +89,7 @@ static void htc_process_target_rdy(struct htc_target *target, ...@@ -89,7 +89,7 @@ static void htc_process_target_rdy(struct htc_target *target,
void *buf) void *buf)
{ {
struct htc_endpoint *endpoint; struct htc_endpoint *endpoint;
struct htc_ready_msg *htc_ready_msg = (struct htc_ready_msg *) buf; struct htc_ready_msg *htc_ready_msg = buf;
target->credit_size = be16_to_cpu(htc_ready_msg->credit_size); target->credit_size = be16_to_cpu(htc_ready_msg->credit_size);
......
...@@ -151,12 +151,12 @@ static void ath9k_deinit_softc(struct ath_softc *sc); ...@@ -151,12 +151,12 @@ static void ath9k_deinit_softc(struct ath_softc *sc);
static void ath9k_op_ps_wakeup(struct ath_common *common) static void ath9k_op_ps_wakeup(struct ath_common *common)
{ {
ath9k_ps_wakeup((struct ath_softc *) common->priv); ath9k_ps_wakeup(common->priv);
} }
static void ath9k_op_ps_restore(struct ath_common *common) static void ath9k_op_ps_restore(struct ath_common *common)
{ {
ath9k_ps_restore((struct ath_softc *) common->priv); ath9k_ps_restore(common->priv);
} }
static const struct ath_ps_ops ath9k_ps_ops = { static const struct ath_ps_ops ath9k_ps_ops = {
...@@ -174,7 +174,7 @@ static void ath9k_iowrite32(void *hw_priv, u32 val, u32 reg_offset) ...@@ -174,7 +174,7 @@ static void ath9k_iowrite32(void *hw_priv, u32 val, u32 reg_offset)
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath_softc *sc = (struct ath_softc *) common->priv; struct ath_softc *sc = common->priv;
if (NR_CPUS > 1 && ah->config.serialize_regmode == SER_REG_MODE_ON) { if (NR_CPUS > 1 && ah->config.serialize_regmode == SER_REG_MODE_ON) {
unsigned long flags; unsigned long flags;
...@@ -189,7 +189,7 @@ static unsigned int ath9k_ioread32(void *hw_priv, u32 reg_offset) ...@@ -189,7 +189,7 @@ static unsigned int ath9k_ioread32(void *hw_priv, u32 reg_offset)
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath_softc *sc = (struct ath_softc *) common->priv; struct ath_softc *sc = common->priv;
u32 val; u32 val;
if (NR_CPUS > 1 && ah->config.serialize_regmode == SER_REG_MODE_ON) { if (NR_CPUS > 1 && ah->config.serialize_regmode == SER_REG_MODE_ON) {
...@@ -229,7 +229,7 @@ static unsigned int ath9k_reg_rmw(void *hw_priv, u32 reg_offset, u32 set, u32 cl ...@@ -229,7 +229,7 @@ static unsigned int ath9k_reg_rmw(void *hw_priv, u32 reg_offset, u32 set, u32 cl
{ {
struct ath_hw *ah = hw_priv; struct ath_hw *ah = hw_priv;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath_softc *sc = (struct ath_softc *) common->priv; struct ath_softc *sc = common->priv;
unsigned long flags; unsigned long flags;
u32 val; u32 val;
...@@ -608,7 +608,7 @@ static int ath9k_nvmem_request_eeprom(struct ath_softc *sc) ...@@ -608,7 +608,7 @@ static int ath9k_nvmem_request_eeprom(struct ath_softc *sc)
} }
/* devres manages the calibration values release on shutdown */ /* devres manages the calibration values release on shutdown */
ah->nvmem_blob = (u16 *)devm_kmemdup(sc->dev, buf, len, GFP_KERNEL); ah->nvmem_blob = devm_kmemdup(sc->dev, buf, len, GFP_KERNEL);
kfree(buf); kfree(buf);
if (!ah->nvmem_blob) if (!ah->nvmem_blob)
return -ENOMEM; return -ENOMEM;
......
...@@ -304,7 +304,7 @@ void ath_paprd_calibrate(struct work_struct *work) ...@@ -304,7 +304,7 @@ void ath_paprd_calibrate(struct work_struct *work)
void ath_ani_calibrate(struct timer_list *t) void ath_ani_calibrate(struct timer_list *t)
{ {
struct ath_common *common = from_timer(common, t, ani.timer); struct ath_common *common = from_timer(common, t, ani.timer);
struct ath_softc *sc = (struct ath_softc *)common->priv; struct ath_softc *sc = common->priv;
struct ath_hw *ah = sc->sc_ah; struct ath_hw *ah = sc->sc_ah;
bool longcal = false; bool longcal = false;
bool shortcal = false; bool shortcal = false;
......
...@@ -781,7 +781,7 @@ static const struct pci_device_id ath_pci_id_table[] = { ...@@ -781,7 +781,7 @@ static const struct pci_device_id ath_pci_id_table[] = {
/* return bus cachesize in 4B word units */ /* return bus cachesize in 4B word units */
static void ath_pci_read_cachesize(struct ath_common *common, int *csz) static void ath_pci_read_cachesize(struct ath_common *common, int *csz)
{ {
struct ath_softc *sc = (struct ath_softc *) common->priv; struct ath_softc *sc = common->priv;
u8 u8tmp; u8 u8tmp;
pci_read_config_byte(to_pci_dev(sc->dev), PCI_CACHE_LINE_SIZE, &u8tmp); pci_read_config_byte(to_pci_dev(sc->dev), PCI_CACHE_LINE_SIZE, &u8tmp);
...@@ -799,7 +799,7 @@ static void ath_pci_read_cachesize(struct ath_common *common, int *csz) ...@@ -799,7 +799,7 @@ static void ath_pci_read_cachesize(struct ath_common *common, int *csz)
static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data) static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data)
{ {
struct ath_hw *ah = (struct ath_hw *) common->ah; struct ath_hw *ah = common->ah;
common->ops->read(ah, AR5416_EEPROM_OFFSET + (off << AR5416_EEPROM_S)); common->ops->read(ah, AR5416_EEPROM_OFFSET + (off << AR5416_EEPROM_S));
...@@ -820,7 +820,7 @@ static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data) ...@@ -820,7 +820,7 @@ static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data)
/* Need to be called after we discover btcoex capabilities */ /* Need to be called after we discover btcoex capabilities */
static void ath_pci_aspm_init(struct ath_common *common) static void ath_pci_aspm_init(struct ath_common *common)
{ {
struct ath_softc *sc = (struct ath_softc *) common->priv; struct ath_softc *sc = common->priv;
struct ath_hw *ah = sc->sc_ah; struct ath_hw *ah = sc->sc_ah;
struct pci_dev *pdev = to_pci_dev(sc->dev); struct pci_dev *pdev = to_pci_dev(sc->dev);
struct pci_dev *parent; struct pci_dev *parent;
......
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