]> git.baikalelectronics.ru Git - kernel.git/commit
irda: fix overly long udelay()
authorArnd Bergmann <arnd@arndb.de>
Thu, 24 Nov 2016 16:26:22 +0000 (17:26 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Nov 2016 00:59:50 +0000 (19:59 -0500)
commit741afa4b9fa05be1710e0e653cb696dd39a148b9
tree437fab5df65c5a4a95e46071b742b8fea005025f
parent988ff8ddbcabe91c7836c382e2d4b8204ff952fe
irda: fix overly long udelay()

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: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/w83977af_ir.c