Skip to content
  • Arnd Bergmann's avatar
    ide: avoid warning for timings calculation · 921edf31
    Arnd Bergmann authored
    
    
    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: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    921edf31