All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: remove use of do_div with 32-bit dividend in quota debug code
@ 2017-04-15 14:46 Eric Sandeen
  2017-04-17 18:27 ` Bill O'Donnell
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Eric Sandeen @ 2017-04-15 14:46 UTC (permalink / raw)
  To: linux-xfs

The kbuild test robot caught this; in debug code we have another
caller of do_div with a 32-bit dividend (j) which is caught now
that we are using the kernel-supplied do_div.

None of the values used here are 64-bit; just use simple division.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index b669b12..dedeb7f 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -851,8 +851,7 @@ struct xfs_qm_isolate {
 	 * started afresh by xfs_qm_quotacheck.
 	 */
 #ifdef DEBUG
-	j = XFS_FSB_TO_B(mp, XFS_DQUOT_CLUSTER_SIZE_FSB);
-	do_div(j, sizeof(xfs_dqblk_t));
+	j = XFS_FSB_TO_B(mp, XFS_DQUOT_CLUSTER_SIZE_FSB) / sizeof(xfs_dqblk_t);
 	ASSERT(mp->m_quotainfo->qi_dqperchunk == j);
 #endif
 	dqb = bp->b_addr;


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

end of thread, other threads:[~2017-04-19 20:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-15 14:46 [PATCH] xfs: remove use of do_div with 32-bit dividend in quota debug code Eric Sandeen
2017-04-17 18:27 ` Bill O'Donnell
2017-04-17 18:59 ` Darrick J. Wong
2017-04-19 19:29   ` Eric Sandeen
2017-04-19 19:41 ` [PATCH V2] " Eric Sandeen
2017-04-19 20:01   ` Darrick J. Wong
2017-04-19 20:21   ` Bill O'Donnell
2017-04-19 20:23   ` Bill O'Donnell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.