Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp2033407lqg; Mon, 4 Mar 2024 10:42:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWyj5io7SZSizJkgRQ2w4ymDM0uWDhk9YWwj/hRJDjtKi8QXsiE4H7aiO7pqwKLHTlGynFJQ8DQC+DwvjYgEh58u5QFQwsyjG6oiv7tRg== X-Google-Smtp-Source: AGHT+IFbF47D//F6eTCG10bRwiW64K6uSVExXi47vNg3OCXeYpjOdvuQqrcqt40tlCPniQgPF/yR X-Received: by 2002:a05:6808:bd6:b0:3c1:ae62:e629 with SMTP id o22-20020a0568080bd600b003c1ae62e629mr12148026oik.50.1709577759572; Mon, 04 Mar 2024 10:42:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709577759; cv=pass; d=google.com; s=arc-20160816; b=jF5kgzGx/2bNh40yeY41VL+32J54eCL2tvxO2Csa8aar3WfhkNjdzmSWJE7/r7A/gj vtRvNtEdnU1duUF6rkAclMb+VbRWp8tCsQINzmpLAFXq3v7rQ5qL9uXob+76QlLTkS75 jx3MB1lw+UKPSOKUaO57JqpEEP/uCjiutcd58pWJIRGam7hTFFUAdHYBIBKuQ15Cz58Y fe3Psic64n4qX9FdocaYKC2tG/HtTXsmv3domdXmygxVy45fuK8ol7ygHI6wNdmEA8Ib 5cmq+uoCtsG040D9lTzwEnw/ALDaX/e4cnwGGFszAxWzm80Tpq3+UlfmHs890pbVXZFs bnLw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=+K8qGGJZU0dVFlAnq42rJW59Laz5svfdA3lu6VKJprE=; fh=hSKZ3fjiLQrmS5P0rA0JeMgQYjZmwKjJmLn+QFeJnzQ=; b=krMcTzRcRAgZtL9lpayIOZMXeO8cQr4ObMgTX65bZ9Rq63Q4Vcw00hwnh+wQefIQTR FAEpAPd/OVp5+s79gK0UHWSkZxLb8ONt0+JzSbvVITbu+4bGDxggKPHXig7/ZEdcyeWs S5EGhN1zWuwH1t0ydHTImNM3HGpGWqdD9DZUXd8g7nPerU80jm89GyFGpihiFN3+cHQl ng+hgIJRVA+lEB5Tob3EEXP/YkTRtqPDcQ13G5qem2fxwITorNnV9lQAXvVH9JqZRABM tZosAOniXUSiYKYpQJioGn6teh087+CvmH7jVXMg9rWJkXHN1AXKPGEvErsPlknb9CPG yf1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RgdEiJpv; arc=pass (i=1 spf=pass spfdomain=flex--edliaw.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-91072-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e17-20020a635011000000b005dc858b5b75si8867856pgb.848.2024.03.04.10.42.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 10:42:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91072-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RgdEiJpv; arc=pass (i=1 spf=pass spfdomain=flex--edliaw.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-91072-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2D826B27547 for ; Mon, 4 Mar 2024 18:12:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A853C627E4; Mon, 4 Mar 2024 18:12:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RgdEiJpv" Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E79D626CB for ; Mon, 4 Mar 2024 18:11:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709575919; cv=none; b=qIddNg9k9D8B7xJQ7tBD3HKYMpfdLf2fkybozgTlI69YDNrqad2/LCQhz1X1YSf9EDx8bXxo4bUqy/zlLUS7m0VhU5NfGRruGoMjKgYkaK7Ahq9Xckt/svDiGALMl3IYKmL60UTYO2XqzBczc5GCy9rWLwQsy5E1tCO5PbO5cKw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709575919; c=relaxed/simple; bh=FqLV9lNiSU7gSVzmh0RUNwWYr0jxygkZHnJe2yCKIHk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=EnY+e2Np1EepXK2W+IAcl4DnQENcd/gVFBe0l9DNvXQj8xUmF2P9ysvFCoQk0oxRSYe8lfd8eQ0Dpzdl+0WDeDQj7pEfmGVI18QRPWkgEN3EGgthLRJ00NMpHSXsoWVyggeUbWB2Ot2k+cNn1oomFB0Mt35hlKmLx1ItiQB0Msg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--edliaw.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=RgdEiJpv; arc=none smtp.client-ip=209.85.210.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--edliaw.bounces.google.com Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-6e4867c8ea5so4741845b3a.1 for ; Mon, 04 Mar 2024 10:11:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709575918; x=1710180718; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=+K8qGGJZU0dVFlAnq42rJW59Laz5svfdA3lu6VKJprE=; b=RgdEiJpvj3Bmgib+raIdYN4WBa77xy6L6FhaoQOrogFyHQj5JCmOM1w8oNTLfqiRtB uyUTtm2hVM4A16ZbrViQGNo8Jz/I+HVoMwFWYQ4OSS4TUa9qfDpKK4c9ZH34W9LuvZRV NL8bQDrfUl/1HB1yN3CZCMx8hXFE31j1+B768iEeKPNc6t5sSoRPOtPkm7jG1ovfYYDU wioFoQeuaU1xdqIbCiySvUE05cuWEznqW4uM6+7It+Rh04WDgXedYf4xMp0P97nlXXcj w3T4/L1yDfYCJlLYus+bs+NlCysjmR3XLUGIZ52KPqT7IFCDfCllSMoKbWXzN+D0OuVc 8aBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709575918; x=1710180718; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+K8qGGJZU0dVFlAnq42rJW59Laz5svfdA3lu6VKJprE=; b=Jp09IITzLlD6ouoeuuNVSo1d4cR4VfoI/62OYEZ/GDAmnruOJ8BSq5ye5EzkU9ozOA 5UWnd08JXL1ewYMyR7lfARfEXrhg0VQcowLI8nTEkL7OFSlpMMeEP8hsVLFm9EjCy3kB CazVm0tv0nt2HlveHrpmf2D/CG+6hau8bsD5lFnSSBmygvxyrS1+KsyUgMTNCVCxx3dx 4o13RU1Em9y6zdef4tgZhpaV06Qrmtscg1QBn1ibup+noAJj8pauDf4ZxciBbVBrc+9K iCkv/Le3NvhYvvemgnP7vst/yYFGq0ySncFBZZr9cNcphKXdjkWDuUr+ZrHzrsVjkW8R NrJQ== X-Gm-Message-State: AOJu0Yx/FV/tY3D+l0OgDni8QB8eVmowY9ErYZtRg1zhDkT8tvArdyRs CXJY8GjPNNR72PZQTljKmtHaXb7FVqIGQvracTuHfomUVEK9/qX46DCmgNGq/P6X+LFTgso6BiT aYjjuCllKSIEx+MEShpBka8B2szw42NcYhoT3JoZ7CON5ew5X6NIdnkkUiJmyC6+0KvWPfvKC2q vL+cvNzgc6jeno4lRBF+WP7i6FTD3T8Ak7Gr+V0HND X-Received: from edliaw.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:305d]) (user=edliaw job=sendgmr) by 2002:a05:6a00:27a0:b0:6e5:8053:af92 with SMTP id bd32-20020a056a0027a000b006e58053af92mr788006pfb.4.1709575917445; Mon, 04 Mar 2024 10:11:57 -0800 (PST) Date: Mon, 4 Mar 2024 18:11:34 +0000 In-Reply-To: <20240304181140.644212-1-edliaw@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240304181140.644212-1-edliaw@google.com> X-Mailer: git-send-email 2.44.0.rc1.240.g4c46232300-goog Message-ID: <20240304181140.644212-4-edliaw@google.com> Subject: [PATCH v1 3/3] selftests/timers/posix_timers: Use llabs for long long From: Edward Liaw To: linux-kernel@vger.kernel.org, John Stultz , Thomas Gleixner , Stephen Boyd , Shuah Khan , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: linux-kselftest@vger.kernel.org, kernel-team@android.com, Edward Liaw , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Fixes clang warning: absolute value function 'abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value. Signed-off-by: Edward Liaw --- 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 0f550fc9e879..78b4b2d3dc44 100644 --- a/tools/testing/selftests/timers/posix_timers.c +++ b/tools/testing/selftests/timers/posix_timers.c @@ -82,7 +82,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) return -1; return 0; -- 2.44.0.rc1.240.g4c46232300-goog