Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3356414pxv; Mon, 28 Jun 2021 02:48:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzUnGeUc8k2YM9uWi2dIveTdiomvIISqaiuHQRETMgh4OacvvXyHGLImA5/fXRyUVc1qBz X-Received: by 2002:a50:d64a:: with SMTP id c10mr32458695edj.199.1624873713362; Mon, 28 Jun 2021 02:48:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624873713; cv=none; d=google.com; s=arc-20160816; b=mWby4gnIQf5V6iknS4wPYJ2yIF+iuJQV1bDfPdmqPG+Ne27amsGRET2Gtwj2wiD/wT MceO5BiexRSSzPHUE10j7f5iV0Y7HJe6Q+4s5hl1D78Z8sHt4dhkvmodvGtY6398VFqt E9e0n2AHaJP4DFyu7rq7tB2hU5ladgM+/AlCOYUoDt97B9uIh2J3G5pidXo9M+no5XsJ b8cwTzus7FcWn/RxnhtGaNUw/IflgGhRFI/3Wl53fY2l8e4wP5lz5A974v0V7kdJbS1x BG5QLHEgEzIakZ+SsL3jEbZGUTFl0qHg4oCf08MVp75aGhB3kCv2YbtZRIiEFHx2ZCqX dqAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=M1PSxNv11vEQ/dV/nSn7VQstGKHef8H9HEckMab64xc=; b=sjb+e8TGadyG3PU8JSGN0kx9vZdf6cgZPraXmS8oo8dy276BVp6fcN5SyF4/Wjdj43 DcEbxOXYICFSzPVDwJLXwKtnZjwy/vBo3cBRVSqzYyTvV7t/Tcyggcy/uphUJsXShYyt jsFZJ0N0piait4dLSCz1X9HoibxKPhh8mpAeZ1/SaSRg1Z2vGsos9pLpxB76ZvwcypbW g+aZu4APNZhrYIiEVsOfMAqhPke6jM3NxmlwCtpxLo9bH6zRU3u5FoX7lbhnCTNDL0gx XnsdyisJ7rLQDSqHUevRENa6F8/17L3o18wNSfuDL8CqP/Q8sK+y30B5sMmpG4UUmijB KXWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ArMfRGf+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i19si12545534edc.50.2021.06.28.02.48.07; Mon, 28 Jun 2021 02:48:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ArMfRGf+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232587AbhF1Jt3 (ORCPT + 99 others); Mon, 28 Jun 2021 05:49:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33209 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232586AbhF1Jt3 (ORCPT ); Mon, 28 Jun 2021 05:49:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624873623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M1PSxNv11vEQ/dV/nSn7VQstGKHef8H9HEckMab64xc=; b=ArMfRGf+yEropZ2Yjv168AAoUBdQJGaYlQn2ZOgku58ySDh/yxiTgH72VxjWCpDnNBLsvF LWguHSvyPm+H5lpGyI5zgPYuiyRkahFp1s0g5WUXGqVfPhuqpJjulDeJG569viht/kMiug DU6XeKagPLtM7nnyP4hwibNVV8ZkQmk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-255-MegPe-coP_C1WswHwCT9vQ-1; Mon, 28 Jun 2021 05:47:01 -0400 X-MC-Unique: MegPe-coP_C1WswHwCT9vQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BDF341906804; Mon, 28 Jun 2021 09:46:58 +0000 (UTC) Received: from x1.bristot.me.homenet.telecomitalia.it (ovpn-113-121.rdu2.redhat.com [10.10.113.121]) by smtp.corp.redhat.com (Postfix) with ESMTP id 691CF60C9F; Mon, 28 Jun 2021 09:46:53 +0000 (UTC) From: Daniel Bristot de Oliveira To: Steven Rostedt Cc: Daniel Bristot de Oliveira , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, kernel test robot Subject: [PATCH 2/4] trace/osnoise: Make interval u64 on osnoise_main Date: Mon, 28 Jun 2021 11:45:48 +0200 Message-Id: <4ae1e7780563598563de079a3ef6d4d10b5f5546.1624872608.git.bristot@redhat.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kernel test robot reported: >> kernel/trace/trace_osnoise.c:966:3: warning: comparison of distinct pointer types ('typeof ((interval)) *' (aka 'long long *') and 'uint64_t *' (aka 'unsigned long long *')) [-Wcompare-distinct-pointer-types] do_div(interval, USEC_PER_MSEC); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/div64.h:228:28: note: expanded from macro 'do_div' (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \ ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ As interval cannot be negative because sample_period >= sample_runtime, making interval u64 on osnoise_main() is enough to fix this problem. Fixes: bce29ac9ce0b ("trace: Add osnoise tracer") Reported-by: kernel test robot Signed-off-by: Daniel Bristot de Oliveira --- kernel/trace/trace_osnoise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c index e2401659b0e5..4cd9e66e8513 100644 --- a/kernel/trace/trace_osnoise.c +++ b/kernel/trace/trace_osnoise.c @@ -1202,7 +1202,7 @@ static struct cpumask save_cpumask; */ static int osnoise_main(void *data) { - s64 interval; + u64 interval; while (!kthread_should_stop()) { -- 2.31.1