drm/nouveau/clk: fix gcc-7 -Wint-in-bool-context warning
authorArnd Bergmann <arnd@arndb.de>
Tue, 16 Jan 2018 13:44:50 +0000 (14:44 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 2 Feb 2018 05:24:10 +0000 (15:24 +1000)
commitb515483e12b81da8cb62f1ff2461d6c29cf5115f
tree5dee7227e9803bdecd66aaea4382d9dde848020e
parente64fe9db2d1a31f6475ab1d5758860e7aa0cbb88
drm/nouveau/clk: fix gcc-7 -Wint-in-bool-context warning

gcc thinks that interpreting a multiplication result as a bool
is confusing:

drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c: In function 'read_pll':
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c:133:8: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]

Adding a temporary variable to contain the divisor helps make
it clear what is going on and avoids that warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c