• Arnd Bergmann's avatar
    irda: fix overly long udelay() · 9b5c9f07
    Arnd Bergmann authored
    commit c9bd2823 upstream.
    
    irda_get_mtt() returns a hardcoded '10000' in some cases,
    and with gcc-7, we get a build error because this triggers a
    compile-time check in udelay():
    
    drivers/net/irda/w83977af_ir.o: In function `w83977af_hard_xmit':
    w83977af_ir.c:(.text.w83977af_hard_xmit+0x14c): undefined reference to `__bad_udelay'
    
    Older compilers did not run into this because they either did not
    completely inline the irda_get_mtt() or did not consider the
    10000 value a constant expression.
    
    The code has been wrong since the start of git history.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    9b5c9f07
w83977af_ir.c 29.9 KB