aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Paul <[email protected]>2019-11-06 14:41:15 -0500
committerSean Paul <[email protected]>2019-11-06 15:20:37 -0500
commitb149cbfeecaa2b2870d2c4f878382a024e6e4975 (patch)
treef7087b1b658692c96caabe1ca42dfdcddf4b99b9
parent7f4009c4bbea4438b50f3b12d1c57da3f5cd8db3 (diff)
drm/mst: Fix up u64 division
Change rem_nsec to u32 since that's what do_div returns, this avoids the u64 divide in the drm_print args. Changes in v2: - Instead of doing do_div in drm_print, make rem_nsec u32 (Ville) Link to v1: https://patchwork.freedesktop.org/patch/msgid/[email protected] Fixes: 12a280c72868 ("drm/dp_mst: Add topology ref history tracking for debugging") Cc: Juston Li <[email protected]> Cc: Imre Deak <[email protected]> Cc: Ville Syrjälä <[email protected]> Cc: Harry Wentland <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Sean Paul <[email protected]> Cc: Lyude Paul <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: [email protected] Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/drm_dp_mst_topology.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index 11adc4b6ccfe..ae5809a1f19a 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -1507,12 +1507,12 @@ __dump_topology_ref_history(struct drm_dp_mst_topology_ref_history *history,
ulong *entries;
uint nr_entries;
u64 ts_nsec = entry->ts_nsec;
- u64 rem_nsec = do_div(ts_nsec, 1000000000);
+ u32 rem_nsec = do_div(ts_nsec, 1000000000);
nr_entries = stack_depot_fetch(entry->backtrace, &entries);
stack_trace_snprint(buf, PAGE_SIZE, entries, nr_entries, 4);
- drm_printf(&p, " %d %ss (last at %5llu.%06llu):\n%s",
+ drm_printf(&p, " %d %ss (last at %5llu.%06u):\n%s",
entry->count,
topology_ref_type_to_str(entry->type),
ts_nsec, rem_nsec / 1000, buf);