]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
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)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Thu, 17 Sep 2020 06:47:06 +0000 (00:47 -0600)
commit919daf91b60c07c94041bb230e31ac390ca4aa6d
tree8161d7251113a3d61fbcad52be3ef92ed2a64ee7
parentf6f7fae4d3c2c79b99dd6659477e1b5a1b3973fd
include/linux/log2.h: add missing () around n in roundup_pow_of_two()

BugLink: https://bugs.launchpad.net/bugs/1895880
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: William Breathitt Gray <william.gray@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
include/linux/log2.h