Skip to content

Commit 40d4c76

Browse files
committed
firewire: core: fix undefined reference error in ARM EABI
For ARM EABI, GCC generates a reference to __aeabi_uldivmod when compiling a division of 64-bit integer with 32-bit integer. This function is not available in Linux kernel. In such cases, helper macros are defined in include/linux/math64.h. This commit replaces the division with div_u64(). Fixes: 8ec6a8e ("firewire: core: suppress overflow warning when computing jiffies from isochronous cycle") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202509270428.FZaO2PPq-lkp@intel.com/ Link: https://lore.kernel.org/r/20250928011910.581475-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
1 parent e216c49 commit 40d4c76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/firewire/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct fw_packet;
3030
// This is the arbitrary value we use to indicate a mismatched gap count.
3131
#define GAP_COUNT_MISMATCHED 0
3232

33-
#define isoc_cycles_to_jiffies(cycles) usecs_to_jiffies((u32)((u64)(cycles) * USEC_PER_SEC / 8000))
33+
#define isoc_cycles_to_jiffies(cycles) usecs_to_jiffies((u32)div_u64((u64)cycles * USEC_PER_SEC, 8000))
3434

3535
extern __printf(2, 3)
3636
void fw_err(const struct fw_card *card, const char *fmt, ...);

0 commit comments

Comments
 (0)