include/linux/log2.h: add missing () around n in roundup_pow_of_two()
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 4 Sep 2020 23:36:19 +0000 (16:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Sep 2020 09:47:34 +0000 (11:47 +0200)
commitad68326969f850d6ddf8151ee76299078f73a3cf
tree1040e4cbcbe9108fe62b0eb5066534c653747952
parent2e4a2bac24b8fd3ad95c152d911831e120f79b96
include/linux/log2.h: add missing () around n in roundup_pow_of_two()

[ Upstream commit 428fc0aff4e59399ec719ffcc1f7a5d29a4ee476 ]

Otherwise gcc generates warnings if the expression is complicated.

Fixes: 312a0c170945 ("[PATCH] LOG2: Alter roundup_pow_of_two() so that it can use a ilog2() on a constant")
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Link: https://lkml.kernel.org/r/0-v1-8a2697e3c003+41165-log_brackets_jgg@nvidia.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/log2.h