netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dpaa2-eth: Use proper division helper in dpaa2_dbg_ch_show
@ 2020-04-28 17:42 Nathan Chancellor
  2020-04-28 18:34 ` Nick Desaulniers
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2020-04-28 17:42 UTC (permalink / raw)
  To: Ioana Ciornei, Ioana Radulescu, David S. Miller
  Cc: netdev, linux-kernel, clang-built-linux, Nathan Chancellor

When building arm32 allmodconfig:

ERROR: modpost: "__aeabi_uldivmod"
[drivers/net/ethernet/freescale/dpaa2/fsl-dpaa2-eth.ko] undefined!

frames and cdan are both of type __u64 (unsigned long long) so we need
to use div64_u64 to avoid this issues.

Fixes: 460fd830dd9d ("dpaa2-eth: add channel stat to debugfs")
Link: https://github.com/ClangBuiltLinux/linux/issues/1012
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c
index 80291afff3ea..0a31e4268dfb 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c
@@ -139,7 +139,7 @@ static int dpaa2_dbg_ch_show(struct seq_file *file, void *offset)
 			   ch->stats.dequeue_portal_busy,
 			   ch->stats.frames,
 			   ch->stats.cdan,
-			   ch->stats.frames / ch->stats.cdan,
+			   div64_u64(ch->stats.frames, ch->stats.cdan),
 			   ch->buf_count);
 	}
 

base-commit: 0fd02a5d3eb7020a7e1801f8d7f01891071c85e4
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-28 21:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 17:42 [PATCH] dpaa2-eth: Use proper division helper in dpaa2_dbg_ch_show Nathan Chancellor
2020-04-28 18:34 ` Nick Desaulniers
2020-04-28 21:32   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).