Received: by 2002:ab2:7041:0:b0:1f4:bcc8:f211 with SMTP id x1csp102012lql; Fri, 12 Apr 2024 05:15:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWwA7SOUvl99pnaV59RrKW/R6vmVuwK0SkmZ+nYEonRgPF7RkvuNPsdd+KHyHqkWFxfMk9I03iWrmLHs8Ti8iCN3RHXqhoVp2NS83TB8A== X-Google-Smtp-Source: AGHT+IF3jnCL38v+A7BWLU5QNJm6rMfXg95C2jl34dzdbriHB/bre2uL74L3pKwNEToRsF2yDfXU X-Received: by 2002:ac2:5544:0:b0:515:bee6:5e8c with SMTP id l4-20020ac25544000000b00515bee65e8cmr1391637lfk.40.1712924157098; Fri, 12 Apr 2024 05:15:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712924157; cv=pass; d=google.com; s=arc-20160816; b=SOhOLEvRq7KP0rdpqIF024KCBJ3cEKQqAJyQAfVz+AMUkOOzkUlTCfWei+533aOyrF KOlT3gjuSlcEUOhiE48LgjcdWQukYYLHgi3THoyT07HQRI+7lkMTGkbVeP15+KJRgPLD E1RkR0pImWIzLYCMtEhBY78IM0VkQi/Zh27CH5CnZ3J0E/B3k2Ype5X8ecA5IQV4JYou 0eKr7gtOG57ODBX1j74Iq3EREa/L1u52ASdaH/er9aU4wSAXXW87f7OqDSgXdMLw+4Ev vCUA8JgxXn4PvYuNO0k8IPchABeIhmu5t/TnaQEZf82ZghvDuSEHqqPCa+owexhkORvY dXMA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=g/zum35qSt/ctc/dbKC/QNKBR2ZJ2X2QpQ9OIixOzNM=; fh=qBQZ+m2ZK3zTOXdg45+v/MCvVNDqZVaUedakyxcWzqo=; b=AQls/k5aop/ddgrp49M1i0UZmpYRWbh07HzZSRCMOQYHdZPkDgIVwRsTgzJw856tzZ xQEUdBoo6CpXBR95L/Qnq6rwW5dD7vY1Tn6NUkZhwMxTzc3lfd6T2B0PeZ0UACDwncuk lZCoZy5424XNaGgH6zeL7+mnsFLlnQwTn3GcOOoWGObRmlmC6SuUS87hifI5ZzzpAJ84 OGXNb+AFWQUthylicX4JUamkifNp8kESpC9UYZAMG6qcJKVGPt+mA4nXaWSezWPMwKYI UMhj9l3Q4MAdUyWND4ZUBUPoe/KxeVDNjVnBmtkYNSJVtZFf1G0iLzD6tmH42DHkp2i7 cedQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Rx5iFdOy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-142631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142631-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i8-20020a0564020f0800b00570011a161dsi331707eda.580.2024.04.12.05.15.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 05:15:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-142631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Rx5iFdOy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-142631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-142631-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CC18A1F22C23 for ; Fri, 12 Apr 2024 12:15:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB58456B68; Fri, 12 Apr 2024 12:15:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Rx5iFdOy"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="6rlityCd" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64F4B57303; Fri, 12 Apr 2024 12:15:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712924131; cv=none; b=MpkSsi7B+IGtfi5vcZEyPL4+5b4zuxqSypfsgBOvRZ6EOh0p0VmLIMlBlHK6vbpS3pWM6VZiLq73yXhDpGQ4X2VMcXRMny+r195KJiNDqzuLw8LFyDCClAw9DVSsDbAtfKgc+QbbQfouort6YuVz22kh9djWRbXIs5qWr0IYW1A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712924131; c=relaxed/simple; bh=vOjOVmBk53GEykb+2BS8HFGeywIifeGxZfsHU6yYkaI=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=IAuCSia3vvRfEXbjbzHbQGKC06t+bQbHxh89FBmN74goMxoiqHbb/sYIFEPwoKeCyxXXfJSua3emBs5RTXH0PgttO7kUhoXIx9YYUFoCXe+Zw1FmbaCQJyev0OG4f22VmYb8yCuNBfnzvcsbMrYj21pdlHWXkDRSqpEpkg/6yuM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Rx5iFdOy; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=6rlityCd; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Fri, 12 Apr 2024 12:15:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712924128; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g/zum35qSt/ctc/dbKC/QNKBR2ZJ2X2QpQ9OIixOzNM=; b=Rx5iFdOyfy+qzqYr1KV0d9VhV7sRJsN9/99sPiOe/XLRiI16T7+5kHYo1nsULlmO73PlRH asSOlLa6CGEc3uvqHvt/5alKqCHDqtoC7edsOxZaWVYvXZJ5SL9Id6ddSMJL5ZMacDCL9h dlZt6lcCasfpAvaWAC/1QI1QpfLPVseJCttzq/vaNt11G85S5nf3/KfkFWdyiof1TFVAY/ SDYl/rebRiMsJfQlI79Pbs2TrYFpnTSB4MXnXqCOmcPJQW/jwDvi3RZbnY9SEOzH38ay1f O7cs2ailBxkQNmPrBlEQ57phOoY6rM2jUshp4+m7M3qVsQ7TJVrTV2acH6kVtA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712924128; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g/zum35qSt/ctc/dbKC/QNKBR2ZJ2X2QpQ9OIixOzNM=; b=6rlityCdUzVupabo/5WeUifBVp0u1WOSsg/m6dSbqWELTdkIeLh6/FkvoGDf5QYV7WJ1EB rK89AgS9MDWcffAA== From: "tip-bot2 for John Stultz" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/urgent] selftests: timers: Fix abs() warning in posix_timers test Cc: John Stultz , Thomas Gleixner , stable@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240410232637.4135564-3-jstultz@google.com> References: <20240410232637.4135564-3-jstultz@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171292412753.10875.7390048269032565457.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the timers/urgent branch of tip: Commit-ID: ed366de8ec89d4f960d66c85fc37d9de22f7bf6d Gitweb: https://git.kernel.org/tip/ed366de8ec89d4f960d66c85fc37d9de22f7bf6d Author: John Stultz AuthorDate: Wed, 10 Apr 2024 16:26:30 -07:00 Committer: Thomas Gleixner CommitterDate: Fri, 12 Apr 2024 14:11:15 +02:00 selftests: timers: Fix abs() warning in posix_timers test Building with clang results in the following warning: posix_timers.c:69:6: warning: absolute value function 'abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value] if (abs(diff - DELAY * USECS_PER_SEC) > USECS_PER_SEC / 2) { ^ So switch to using llabs() instead. Fixes: 0bc4b0cf1570 ("selftests: add basic posix timers selftests") Signed-off-by: John Stultz Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240410232637.4135564-3-jstultz@google.com --- tools/testing/selftests/timers/posix_timers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/selftests/timers/posix_timers.c index 348f471..c001dd7 100644 --- a/tools/testing/selftests/timers/posix_timers.c +++ b/tools/testing/selftests/timers/posix_timers.c @@ -66,7 +66,7 @@ static int check_diff(struct timeval start, struct timeval end) diff = end.tv_usec - start.tv_usec; diff += (end.tv_sec - start.tv_sec) * USECS_PER_SEC; - if (abs(diff - DELAY * USECS_PER_SEC) > USECS_PER_SEC / 2) { + if (llabs(diff - DELAY * USECS_PER_SEC) > USECS_PER_SEC / 2) { printf("Diff too high: %lld..", diff); return -1; }