Re: [Nouveau] [PATCH] [RESEND] drm/nouveau/clk: fix gcc-7 -Wint-in-bool-context warning

2017-09-06 Thread Arnd Bergmann
On Wed, Sep 6, 2017 at 10:15 PM, Karol Herbst wrote: > On Wed, Sep 6, 2017 at 10:11 PM, Arnd Bergmann wrote: >>> but with a better name for "denominator". >> >> I don't know what M and P actually are in this function, so I couldn't >> come up with a much

Re: [Nouveau] [PATCH] [RESEND] drm/nouveau/clk: fix gcc-7 -Wint-in-bool-context warning

2017-09-06 Thread Karol Herbst
On Wed, Sep 6, 2017 at 10:11 PM, Arnd Bergmann wrote: > On Wed, Sep 6, 2017 at 4:20 PM, Karol Herbst wrote: >>> In this instance, I think using multiplication is more intuitive >>> than '&&', so I'm adding a comparison to zero instead to shut up >>> the

Re: [Nouveau] [PATCH] [RESEND] drm/nouveau/clk: fix gcc-7 -Wint-in-bool-context warning

2017-09-06 Thread Arnd Bergmann
On Wed, Sep 6, 2017 at 4:20 PM, Karol Herbst wrote: >> In this instance, I think using multiplication is more intuitive >> than '&&', so I'm adding a comparison to zero instead to shut up >> the warning. To further improve readability, I also make the >> error case indented

[Nouveau] [PATCH] [RESEND] drm/nouveau/clk: fix gcc-7 -Wint-in-bool-context warning

2017-09-06 Thread Arnd Bergmann
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] In this