drm/msm: a5xx: Fix improper u64 division
authorSean Paul <seanpaul@chromium.org>
Thu, 4 Oct 2018 19:24:04 +0000 (15:24 -0400)
committerRob Clark <robdclark@gmail.com>
Sun, 7 Oct 2018 18:40:28 +0000 (14:40 -0400)
commitf926a2e1718edc28f59f1079ebb6832532810587
tree12c10d41608dc20399d13c5cab357bf61b254c5e
parenta69c5ed25d71c6342fbc6a52fb09b679456394e3
drm/msm: a5xx: Fix improper u64 division

This patch uses the proper do_div() macro to perform u64 division and
guards against overflow if the result is too large for the unsigned long
return type

Fixes: de0a3d094de0 drm/msm: re-factor devfreq code
Cc: Sharat Masetty <smasetty@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/adreno/a5xx_gpu.c