]> git.baikalelectronics.ru Git - kernel.git/commit
ide: avoid warning for timings calculation
authorArnd Bergmann <arnd@arndb.de>
Fri, 14 Jul 2017 09:25:13 +0000 (11:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Jul 2017 03:37:22 +0000 (04:37 +0100)
commitfa9ba4eeff4ddaff094ee02de516da18bc1b01d2
treede7a67d798a76de632c56effdf29109fc2af760a
parenta3f609ad815dc81912791cd588cb8c1480a29ad8
ide: avoid warning for timings calculation

gcc-7 warns about the result of a constant multiplication used as
a boolean:

drivers/ide/ide-timings.c: In function 'ide_timing_quantize':
drivers/ide/ide-timings.c:112:24: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context]
  q->setup   = EZ(t->setup   * 1000,  T);

This slightly rearranges the macro to simplify the code and avoid
the warning at the same time.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ide/ide-timings.c