Skip to content

Commit b149cbf

Browse files
committed
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: 12a280c ("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]
1 parent 7f4009c commit b149cbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/drm_dp_mst_topology.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,12 +1507,12 @@ __dump_topology_ref_history(struct drm_dp_mst_topology_ref_history *history,
15071507
ulong *entries;
15081508
uint nr_entries;
15091509
u64 ts_nsec = entry->ts_nsec;
1510-
u64 rem_nsec = do_div(ts_nsec, 1000000000);
1510+
u32 rem_nsec = do_div(ts_nsec, 1000000000);
15111511

15121512
nr_entries = stack_depot_fetch(entry->backtrace, &entries);
15131513
stack_trace_snprint(buf, PAGE_SIZE, entries, nr_entries, 4);
15141514

1515-
drm_printf(&p, " %d %ss (last at %5llu.%06llu):\n%s",
1515+
drm_printf(&p, " %d %ss (last at %5llu.%06u):\n%s",
15161516
entry->count,
15171517
topology_ref_type_to_str(entry->type),
15181518
ts_nsec, rem_nsec / 1000, buf);

0 commit comments

Comments
 (0)