Commit 5401fcbe authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

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: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f6eb1fee
...@@ -561,11 +561,9 @@ int ks_wlan_hw_power_save(struct ks_wlan_private *priv); ...@@ -561,11 +561,9 @@ int ks_wlan_hw_power_save(struct ks_wlan_private *priv);
#define KS7010_SIZE_ALIGNMENT 32 #define KS7010_SIZE_ALIGNMENT 32
static static inline size_t hif_align_size(size_t size)
inline int hif_align_size(int size)
{ {
return (size % KS7010_SIZE_ALIGNMENT) ? size + KS7010_SIZE_ALIGNMENT - return ALIGN(size, KS7010_SIZE_ALIGNMENT);
(size % KS7010_SIZE_ALIGNMENT) : size;
} }
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
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