Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1950986lqm; Fri, 3 May 2024 10:54:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXxh5rsOs1XYOnNDqxipgkeQ/vPg/F8NUIeg5Q60qTR9j09UDrIX02kV1Xt/AnvNUVR+yEQeY2LdMhmM+e/ua1IK2UttlwHrkPQCN+yTQ== X-Google-Smtp-Source: AGHT+IFnpzzjx80JEE7035x3ePPY3hCf1v/sMcNXdmoWcVOSCXkyVRi28uER/cKkzM+kZTSrv0X1 X-Received: by 2002:a05:620a:21d7:b0:78d:74b5:d9b with SMTP id h23-20020a05620a21d700b0078d74b50d9bmr3459592qka.42.1714758854992; Fri, 03 May 2024 10:54:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714758854; cv=pass; d=google.com; s=arc-20160816; b=A6mURotzP8kO5buuOwU3AgwQedR6rrzAnw/iaW894dEYY3xCKgWfPVH7RmmeBJxoba XCqneVIP7G0aUcjUN6E91Sz2PkEcZSgbjb5tdW/niO/KufERTLofXwMJItE/24Cg9njm /unYZ33QeUHuHOBnI9jxvxoOBNJgPCTry1Ta+KQmEDPJSUt4PeCuxr9dQKnpxFUEjYqB eMjiqdwHiflSwmx7pHxKisR9gWx9jT7Slsfc/jO5ZfKWI+r6JG6igY1S2xRpKOxYkqSA GDRaLbQ2hIw49piQKfParEcWY08CZ1KJ2T3iDRoMOk48eAdA7N2Df0vL9IcwdwHWE61b rV6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=x0XQCMnsbYkYwtaS+30vq6EUAn0n4Ulc3+8JbTfZjrU=; fh=kKD51KF4Zcl2E16Ljirk6tMEAdpFTBv/oAm2qWFsX1E=; b=WmSGgV/UZ0Dv4xVLL5OSeoRwZWCaMOhoEupFPtFpYjjMmi5qgtHc8Rt7w8IqRTnCGD 8S9XVsHteIXMgN5Gq4PRnpAn0U8K0E4KdDXwvIYOq/EJSyUdKFzvl++mE9yDtfa62m6J A76FxqS8cGi3RiKDdpzq2+HfmDabn95aQ5pu1l/CCQ4TBly17nxXZ9zadElR4Fjr5Hsu UJccAQec9xKMv07Xf7fNx8WRRN835EbdwAaDpZc/p1DojGVF9JfLC4SNHBn92AbN1VxJ K/K1yNpHzM5yrN36nYLA2oDvHivAikdV0pdqFao+vt5zcTIy2v3FKPcU/z3z2WPShaiu gG6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="ZctGSkb/"; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-167990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167990-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u12-20020ae9c00c000000b00790f7912a68si3723187qkk.182.2024.05.03.10.54.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 10:54:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="ZctGSkb/"; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-167990-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167990-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B16191C215E1 for ; Fri, 3 May 2024 17:54:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED60A158213; Fri, 3 May 2024 17:54:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ZctGSkb/" Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (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 18DDC158205 for ; Fri, 3 May 2024 17:54:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714758847; cv=none; b=o+LEm7roQAG1GSdimGaR/5wlOzey3WMP3af/hTwRNe+7jpWKayg+QKDfRHxFTeCJ0LTCJG8uou/kikwwWVy6tXwrhMAVeiwnYNft8Aw22g4ZCelMd77XsLrbjg+yfB0d6JaEPpNcggkHS4EL/4HGnVmb6groeNk2kF5ISQYOaOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714758847; c=relaxed/simple; bh=MmDr3BQCMFU+IxtuacVnHLexHCTvPtzyWCTkicg3BgI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=omES7LBbvsZVGEVqqp5QQxK5e6GnKWumFnhNgCPNps7tYSj4KG6OTzDrs2poLbouHmf2bKVYvfCoM5DObze9810q4gEhvjYh6+f/BU41gJjnwjp6lnB/XLRf2NucZzYglc2OK5rB0H8UeZecjW95NtP1064maBXlFayyAxczX1g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ZctGSkb/; arc=none smtp.client-ip=91.218.175.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Fri, 3 May 2024 10:53:52 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714758840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=x0XQCMnsbYkYwtaS+30vq6EUAn0n4Ulc3+8JbTfZjrU=; b=ZctGSkb/BdmDJ3EmsYgUjqlACWFjy+wtUCPB5wpK9c5hQuQEhXvroesiWdCKe01cerZhl4 lZc2TSh3k0fCMjFNX3qYzv8AV5+b9Uo1RSM+OJL5ZuEQ1aSTBZwiQmRr7UjKQO5J6VIddu GriUkbStsO1LOxVEf7YwERAckrj4XkM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: John Hubbard Cc: Shuah Khan , Tejun Heo , Zefan Li , Johannes Weiner , Michal Hocko , Shakeel Butt , Muchun Song , Waiman Long , Yosry Ahmed , Nhat Pham , Chengming Zhou , Valentin Obst , linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, LKML , llvm@lists.linux.dev Subject: Re: [PATCH 1/4] selftests/cgroup: fix clang build failures for abs() calls Message-ID: References: <20240503035105.93280-1-jhubbard@nvidia.com> <20240503035105.93280-2-jhubbard@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240503035105.93280-2-jhubbard@nvidia.com> X-Migadu-Flow: FLOW_OUT On Thu, May 02, 2024 at 08:51:02PM -0700, John Hubbard wrote: > First of all, in order to build with clang at all, one must first apply > Valentin Obst's build fix for LLVM [1]. Once that is done, then when > building with clang, via: > > make LLVM=1 -C tools/testing/selftests > > ...clang is pickier than gcc, about which version of abs(3) to call, > depending on the argument type: > > int abs(int j); > long labs(long j); > long long llabs(long long j); > > ...and this is causing both build failures and warnings, when running: > > make LLVM=1 -C tools/testing/selftests > > Fix this by calling labs() in value_close(), because the arguments are > unambiguously "long" type. > > [1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/ > > Signed-off-by: John Hubbard Reviewed-by: Roman Gushchin Thanks!