From patchwork Wed Nov 6 17:36:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 11230769 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4976214E5 for ; Wed, 6 Nov 2019 17:36:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3132B2173E for ; Wed, 6 Nov 2019 17:36:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3132B2173E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=poorly.run Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 705086EE13; Wed, 6 Nov 2019 17:36:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yb1-xb44.google.com (mail-yb1-xb44.google.com [IPv6:2607:f8b0:4864:20::b44]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2D8BF6EE13 for ; Wed, 6 Nov 2019 17:36:25 +0000 (UTC) Received: by mail-yb1-xb44.google.com with SMTP id b2so11202780ybr.8 for ; Wed, 06 Nov 2019 09:36:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=n++rl+tiHebhntlpDQiHQau0iOXTMmNNEPp6vboRBkg=; b=qsegFMJmtCJOzPx1DQB9NNacObJWQb5/9tLNHaI5kKSxOGEvff/GjDRtNjjqN5F3dW OxNO9lJLS4v9YoRUG7uhJg2lEZ5syp9mr7mVPFj3XfjzXFu40FaL+ITSrR1MBsNlTQjJ DQO1kHqeqbrRtrNVmwQeUmrldd5lPtbbKR8E+t6/gJG4VGUmrBZo94QH7J3h7yW8I1sp HhwxzE5CIKYAjhoq7UVQ4XBl95JKAvcfmiluopf7kaw7XJwJb9Vg0Jyg4nJ6NL15LuCV YeVViaou9QsfvJj1c9NwFXAzxudpRouNpWHsGTh/Le3393cpDRsdMDdINjAZ5OnCsExb hknA== X-Gm-Message-State: APjAAAWK8IMKVf41ewUaF95R2NkNIi1ciZawccsiGh635rH6X2ZNjFCf Fo5zHlxVuqJnV8YufTkFiUYAGhQF9kI= X-Google-Smtp-Source: APXvYqy/VEJtrJNe532+vwigdt+Br3OXxBIfQgSD+aM72JCz7xif9vwMw5iDB0sMBhbq+ageRNuOaQ== X-Received: by 2002:a5b:c52:: with SMTP id d18mr3089843ybr.98.1573061783872; Wed, 06 Nov 2019 09:36:23 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id l1sm1361814ywh.9.2019.11.06.09.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 09:36:23 -0800 (PST) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/mst: Fix up u64 division Date: Wed, 6 Nov 2019 12:36:15 -0500 Message-Id: <20191106173622.15573-1-sean@poorly.run> X-Mailer: git-send-email 2.24.0.rc1.363.gb1bccd3e3d-goog MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=n++rl+tiHebhntlpDQiHQau0iOXTMmNNEPp6vboRBkg=; b=AjHNvLzfyiOe4XqufjOoYjN3oY/xtNd3ZdjoBPwmpHWieBkr2kOxdR1iEbsmcrGZpS KGzSBLu3WJGnPXPzIjbYbrODhtIjYILJu14q9jscBn9VMiQEIaccJLcilu7ZfyHmP+8v jKRSWo3D27KH49Mhxrija4aGc/OIXhtOZn7H0M4zjZ4KyC2kZ/e/QfzuO2jk3/DdAwFs UoLFu19rPa4heXaKlmsL2A8zMdb0DAHkxgLgOa6/w6K6JdHWyzI+KxWqw7ICfhtrszKw BSnqSo7GtaRz5DbLfLFOClQV67YARsTTKeF2fNRKDzid7UXTADTzMXemHDbqhh9W+m5d psaA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sean Paul , David Airlie , Daniel Vetter , Sean Paul , Juston Li , Harry Wentland Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Sean Paul Use do_div to divide rem_nsec instead of /. Fixes: 12a280c72868 ("drm/dp_mst: Add topology ref history tracking for debugging") Cc: Juston Li Cc: Imre Deak Cc: Ville Syrjälä Cc: Harry Wentland Cc: Daniel Vetter Cc: Sean Paul Cc: Lyude Paul Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Sean Paul --- 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); } /* Now free the history, since this is the only time we expose it */