]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/mst: Fix up u64 division
authorSean Paul <seanpaul@chromium.org>
Wed, 6 Nov 2019 19:41:15 +0000 (14:41 -0500)
committerSean Paul <seanpaul@chromium.org>
Wed, 6 Nov 2019 20:20:37 +0000 (15:20 -0500)
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/20191106173622.15573-1-sean@poorly.run

Fixes: 12a280c72868 ("drm/dp_mst: Add topology ref history tracking for debugging")
Cc: Juston Li <juston.li@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Harry Wentland <hwentlan@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sean Paul <sean@poorly.run>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191106194121.164458-1-sean@poorly.run
drivers/gpu/drm/drm_dp_mst_topology.c

index 11adc4b6ccfe68efc57fbae45f0d22ac38ea0e14..ae5809a1f19aac2d23dc318daedb8f343833d4f0 100644 (file)
@@ -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);