summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wlan.c
diff options
context:
space:
mode:
authorAjay Singh <ajay.kathat@microchip.com>2020-02-14 11:52:18 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-14 08:20:11 -0800
commitbf13984d515d83a40e2686358a641b04f9c2bfc0 (patch)
treedde3592d67ffe66af58d00eec1a0f08326c82a44 /drivers/staging/wilc1000/wlan.c
parenteda308be643f70dfec22d6fb7c6de643bc474d35 (diff)
downloadlinux-bf13984d515d83a40e2686358a641b04f9c2bfc0.tar.bz2
staging: wilc1000: make use of ALIGN macro
Make use of 'ALIGN' macro to align the size data value. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Link: https://lore.kernel.org/r/20200214172250.13026-5-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wlan.c')
-rw-r--r--drivers/staging/wilc1000/wlan.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/wilc1000/wlan.c b/drivers/staging/wilc1000/wlan.c
index 9dfabd1af4e7..db4ef175ccee 100644
--- a/drivers/staging/wilc1000/wlan.c
+++ b/drivers/staging/wilc1000/wlan.c
@@ -508,9 +508,7 @@ int wilc_wlan_handle_txq(struct wilc *wilc, u32 *txq_count)
vmm_sz = HOST_HDR_OFFSET;
vmm_sz += tqe->buffer_size;
-
- if (vmm_sz & 0x3)
- vmm_sz = (vmm_sz + 4) & ~0x3;
+ vmm_sz = ALIGN(vmm_sz, 4);
if ((sum + vmm_sz) > WILC_TX_BUFF_SIZE)
break;