linux-stable/drivers/usb/dwc2
Nathan Chancellor 310780e825 usb: dwc2: hcd_queue: Fix use of floating point literal
A new commit in LLVM causes an error on the use of 'long double' when
'-mno-x87' is used, which the kernel does through an alias,
'-mno-80387' (see the LLVM commit below for more details around why it
does this).

 drivers/usb/dwc2/hcd_queue.c:1744:25: error: expression requires  'long double' type support, but target 'x86_64-unknown-linux-gnu' does not support it
                         delay = ktime_set(0, DWC2_RETRY_WAIT_DELAY);
                                             ^
 drivers/usb/dwc2/hcd_queue.c:62:34: note: expanded from macro 'DWC2_RETRY_WAIT_DELAY'
 #define DWC2_RETRY_WAIT_DELAY (1 * 1E6L)
                                 ^
 1 error generated.

This happens due to the use of a 'long double' literal. The 'E6' part of
'1E6L' causes the literal to be a 'double' then the 'L' suffix promotes
it to 'long double'.

There is no visible reason for a floating point value in this driver, as
the value is only used as a parameter to a function that expects an
integer type. Use NSEC_PER_MSEC, which is the same integer value as
'1E6L', to avoid changing functionality but fix the error.

Link: https://github.com/ClangBuiltLinux/linux/issues/1497
Link: a8083d42b1
Fixes: 6ed30a7d8e ("usb: dwc2: host: use hrtimer for NAK retries")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: John Keeping <john@metanate.com>
Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20211105145802.2520658-1-nathan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-17 15:03:34 +01:00
..
core.c
core.h usb: dwc2: add otg_rev and otg_caps information for gadget driver 2021-10-25 09:20:26 +02:00
core_intr.c
debug.h
debugfs.c usb: dwc2: add otg_rev and otg_caps information for gadget driver 2021-10-25 09:20:26 +02:00
drd.c usb: dwc2: drd: reset current session before setting the new one 2021-10-21 12:49:01 +02:00
gadget.c usb: dwc2: gadget: Fix ISOC flow for elapsed frames 2021-11-17 15:02:11 +01:00
hcd.c usb: dwc2: add otg_rev and otg_caps information for gadget driver 2021-10-25 09:20:26 +02:00
hcd.h
hcd_ddma.c
hcd_intr.c
hcd_queue.c usb: dwc2: hcd_queue: Fix use of floating point literal 2021-11-17 15:03:34 +01:00
hw.h
Kconfig
Makefile
params.c usb: dwc2: stm32mp15: set otg_rev 2021-10-25 09:20:26 +02:00
pci.c
platform.c