summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHaiying Wang <Haiying.Wang@freescale.com>2013-05-17 18:23:44 (GMT)
committerFleming Andrew-AFLEMING <AFLEMING@freescale.com>2013-05-17 20:01:02 (GMT)
commitf24fff6a6f14a9938a200170bd9a0f40c238d58c (patch)
tree163dfc03908345e68e352028e2b2b8a641130599 /include
parentad1bdc90739189c25881f12e21940f84398b8ef0 (diff)
downloadlinux-fsl-qoriq-f24fff6a6f14a9938a200170bd9a0f40c238d58c.tar.xz
qman: use math64 instead of direct 64-bit division.
In 32-bit builds, the ROUNDING macro was breaking kernel assumptions when fed with 64-bit parameters. This forces it to use the recommended wrappers in <linux/math64.h> instead. Signed-off-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Change-Id: Id708cdad58593f38683112adf59984ffd3d763f7 Reviewed-on: http://git.am.freescale.net:8181/2580 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fsl_qman.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/include/linux/fsl_qman.h b/include/linux/fsl_qman.h
index da2c67d3..673724a 100644
--- a/include/linux/fsl_qman.h
+++ b/include/linux/fsl_qman.h
@@ -2417,17 +2417,6 @@ struct qm_ceetm_lfq {
qman_cb_mr ern;
};
-/* Divide 'n' by 'd', rounding down if 'r' is negative, rounding up if
- * it's positive, and rounding to the closest value if it's zero. NB,
- * this macro assumes no particular type, so feed it with types that are
- * appropriate for its use. NB, these arguments should not be expressions
- * unless it is safe for them to be evaluated multiple times. Eg. do not
- * pass in "some_value++" as a parameter to the macro! */
-#define ROUNDING(n, d, r) \
- (((r) < 0) ? ((n) / (d)) : \
- (((r) > 0) ? (((n) + (d) - 1) / (d)) : \
- (((n) + ((d) / 2)) / (d))))
-
/**
* qman_ceetm_bps2tokenrate - Given a desired rate 'bps' measured in bps
* (ie. bits-per-second), compute the 'token_rate' fraction that best