summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ks7010/ks_hostif.h
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2018-04-06 14:37:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-23 14:27:35 +0200
commit5401fcbe298590f401da5f4dfc563dead4171ee5 (patch)
tree32c4263400aa5b989209bd7cda2e4d1e8e913592 /drivers/staging/ks7010/ks_hostif.h
parentf6eb1fee19806d07e85a3fcbe4a7e6ceab93fa4b (diff)
staging: ks7010: rewrite hif_align_size inline function
This commit rewrites hif_align_size inline function to improve readability. It also change parameters and return type from int to size_t which is the correct and the one which is being used when this function is called from several points of the code. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ks7010/ks_hostif.h')
-rw-r--r--drivers/staging/ks7010/ks_hostif.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index 9cc265f9b123..05ff5ca5da19 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -561,11 +561,9 @@ int ks_wlan_hw_power_save(struct ks_wlan_private *priv);
#define KS7010_SIZE_ALIGNMENT 32
-static
-inline int hif_align_size(int size)
+static inline size_t hif_align_size(size_t size)
{
- return (size % KS7010_SIZE_ALIGNMENT) ? size + KS7010_SIZE_ALIGNMENT -
- (size % KS7010_SIZE_ALIGNMENT) : size;
+ return ALIGN(size, KS7010_SIZE_ALIGNMENT);
}
#endif /* __KERNEL__ */