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@xxxxxxxxx> --- drivers/staging/ks7010/ks_hostif.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index edbae62..0ebed53 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging/ks7010/ks_hostif.h @@ -650,11 +650,13 @@ 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; + if (size % KS7010_SIZE_ALIGNMENT) + return size + KS7010_SIZE_ALIGNMENT - + (size % KS7010_SIZE_ALIGNMENT); + + return size; } #endif /* __KERNEL__ */ -- 2.7.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel