mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 09:28:44 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f6eb1fee19
commit
5401fcbe29
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user