diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2020-01-15 13:55:37 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-16 20:59:53 +0100 |
commit | 240503a6e3629e0d32e1b93c648fabb5b37e9122 (patch) | |
tree | efe4d14388e8047a29945ceda3c6a8ec454de044 /drivers/staging/wfx | |
parent | 2f5fd8b07745838e590b61d5b136be8b9f94cc4c (diff) | |
download | linux-stable-240503a6e3629e0d32e1b93c648fabb5b37e9122.tar.gz linux-stable-240503a6e3629e0d32e1b93c648fabb5b37e9122.tar.bz2 linux-stable-240503a6e3629e0d32e1b93c648fabb5b37e9122.zip |
staging: wfx: simplify hif_multi_tx_confirm()
Usage of the "buf_loc" variable does not simplify the function.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-65-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx')
-rw-r--r-- | drivers/staging/wfx/hif_rx.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index f798cd6973b6..33c22c5d629d 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -77,21 +77,16 @@ static int hif_multi_tx_confirm(struct wfx_dev *wdev, const struct hif_msg *hif, const void *buf) { const struct hif_cnf_multi_transmit *body = buf; - const struct hif_cnf_tx *buf_loc = - (const struct hif_cnf_tx *)&body->tx_conf_payload; struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); - int count = body->num_tx_confs; int i; - WARN(count <= 0, "corrupted message"); + WARN(body->num_tx_confs <= 0, "corrupted message"); WARN_ON(!wvif); if (!wvif) return -EFAULT; - for (i = 0; i < count; ++i) { - wfx_tx_confirm_cb(wvif, buf_loc); - buf_loc++; - } + for (i = 0; i < body->num_tx_confs; i++) + wfx_tx_confirm_cb(wvif, &body->tx_conf_payload[i]); return 0; } |