Re: [PATCH] drm/mst: Fix up u64 division

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 06, 2019 at 12:36:15PM -0500, Sean Paul wrote:
> From: Sean Paul <seanpaul@xxxxxxxxxxxx>
> 
> Use do_div to divide rem_nsec instead of /.
> 
> Fixes: 12a280c72868 ("drm/dp_mst: Add topology ref history tracking for debugging")
> Cc: Juston Li <juston.li@xxxxxxxxx>
> Cc: Imre Deak <imre.deak@xxxxxxxxx>
> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Cc: Harry Wentland <hwentlan@xxxxxxx>
> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
> Cc: Sean Paul <sean@xxxxxxxxxx>
> Cc: Lyude Paul <lyude@xxxxxxxxxx>
> Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> Cc: Maxime Ripard <mripard@xxxxxxxxxx>
> Cc: David Airlie <airlied@xxxxxxxx>
> Cc: Daniel Vetter <daniel@xxxxxxxx>
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Signed-off-by: Sean Paul <seanpaul@xxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_dp_mst_topology.c | 4 ++--
>  1 file 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..d2da5f113f16 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -1512,10 +1512,10 @@ __dump_topology_ref_history(struct drm_dp_mst_topology_ref_history *history,
>  		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);
> +			   ts_nsec, do_div(rem_nsec, 1000), buf);

Or just change rem_nsec to u32 since that's what do_div() gives you.

>  	}
>  
>  	/* Now free the history, since this is the only time we expose it */
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux