]> git.baikalelectronics.ru Git - kernel.git/commit
ata: avoid gcc-7 warning in ata_timing_quantize
authorArnd Bergmann <arnd@arndb.de>
Wed, 6 Sep 2017 21:45:34 +0000 (23:45 +0200)
committerTejun Heo <tj@kernel.org>
Thu, 7 Sep 2017 20:33:00 +0000 (13:33 -0700)
commitbe3b5932918a204b8c93545cd42d2cbca1d2d6b6
tree0ffe6bd487ecc6498272308b109abaea8b29c656
parent85e377e331588a1f93a729ee7db28776390235f2
ata: avoid gcc-7 warning in ata_timing_quantize

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

drivers/ata/libata-core.c: In function 'ata_timing_quantize':
drivers/ata/libata-core.c:3164:30: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context]

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: Tejun Heo <tj@kernel.org>
drivers/ata/libata-core.c