Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp498318lqb; Wed, 29 May 2024 01:56:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7Hfu9tzr19PM6vU1HGulnp7Scgt8SQ+sAiwaLL/v2zgyKeH9/m7AP/yPTRRfTuXTEB2cGUR6BdknZrA+MGI4+dSzgs8ebrBsXoKtwqg== X-Google-Smtp-Source: AGHT+IF+iKV0mLwEmIP4Vh3T8v+phSBG03DAwQF/2XUa+8opQwrnX/OnFqHvdfBQl3PESERAmH+M X-Received: by 2002:a05:6808:16a1:b0:3c9:6e55:e24c with SMTP id 5614622812f47-3d1a50acd01mr17056186b6e.11.1716972989597; Wed, 29 May 2024 01:56:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716972989; cv=pass; d=google.com; s=arc-20160816; b=a8OpskwMwN5iBygwHJmyy/655OZz2A/okF4AY8e7wSV/Hy0fW7FY40ZjMjYvgaaYbZ X13PbXbiprL6eyBlY/Zp4qmNhSW0FEJTL6A+Hds12PxoU7fPR9jGNDqK9pimKv1h/4oF 9juOE69UYGUpXwSUPZ+psbEk9edf8cpKrOS1OgzZ+p6c5gmtTeLSROG6OM6uV+jz3iWd JfmrX2l6++RHcpW63Sr1Rkejg1AVIkUTvM6R81SF8tNCk0ucGXjViNyPi3DnMXsQVGDV 1K6BuawLaMCRvmXj7pDG+httwulCx0WlMK0UYB1lOe5ozjAX25A/HUMvUXylpjE0tHsl N7Fw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=6/CD09y2pZU+03thgvTqiTFJgMlhZGZLAYHe+sGMc/g=; fh=9fHawJfnEpC8Bke6atYaI2Dc6j/YJgTbWenQQbznjp0=; b=w4hlVuCoZqBdOqsoB2mdngT2jYpCMKGu+mWJakJk0RWO9tzkFcdWvauEiUxAceHuPk rkNzv472d/4w6osjcgplUHQQRgXymuFiRsCUEOegTB5neod4nSQpqg+Dh/ZDbPbkugnN b7MUmY90OrmmAOS+9i6LDTJUKUEZuX9ipNIP0Zq4VEheepD5EwKriAGz2gV95YBmaDBS LJAt2s+SwYFOvh6BjgdhHjjubPZXpLArOz2RHdrNDAykjLOq9pNFTY1mERpubXHomvKF C43SVnE1TswkWfhTC3uFM+qGCivId2AKiWXydvfdOnRTTgceRL5k7vlTgrc3q95gwKGt 2UMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=XiRW+Zpa; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-193725-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193725-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-682275b3458si10064719a12.398.2024.05.29.01.56.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 01:56:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193725-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=XiRW+Zpa; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-193725-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193725-linux.lists.archive=gmail.com@vger.kernel.org" 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 C185FB2B5FD for ; Wed, 29 May 2024 08:26:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F6BC16D9AC; Wed, 29 May 2024 08:23:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="XiRW+Zpa" Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (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 11580168C3D; Wed, 29 May 2024 08:23:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716970998; cv=none; b=JuZSA/sqZ1CFpGvHG9O4zRM1vcpnzmX+C8KOO4U4CwaCxeZR5jperAAZPbFlo5km7UJcYOguRUO43nK+UkDmqb0qEUgdqZAvU7I/xXvCKSWJdvtukitFQfQiZSf94D09vzkkzVfs8uzg7ljM/ufEYx6OrFa+Tki0fBQZWXTI+iI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716970998; c=relaxed/simple; bh=07Xjk5JBFCnOoz1mUgexuqTBZYBeWpziuUZ0TgxpGwg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=p5cnBcoQBDK5PA/8T8XqyHt9G6jTWL8zwQfpmppsZND3NHctddusAfhyFwY0mxFcLwq+c6SzfgEq0irvecqzY/XgEeab1G+XDNBeE+Ufg0n+zKO1aqRkDqWjND5/w4rohuzMseD7JI0NlvSvxFVXU550vGCJ/rI9GD2a8PT0+TY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au; spf=pass smtp.mailfrom=ellerman.id.au; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b=XiRW+Zpa; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ellerman.id.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1716970993; bh=6/CD09y2pZU+03thgvTqiTFJgMlhZGZLAYHe+sGMc/g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=XiRW+ZpaTrrP8+qBXRvs8QVm2694mJVod+js/TjyavYOAfMvdoxrvDFDCvmA7Ug+5 BPGqItpjFl4YpQ/QTfGysW31o/qsPexH4o3uZ4+hDMW7fhaJul6jjWny+HE+tydOej /s55kQXxs7aKjMPJ4FpAyGh2Qu9860h6VPhE2gFnOjcNpRWJeJ1x0D67PRsXAm0qI6 a8HOHEKRZav5u3lCLAaLL8WuO6VJbFWAidqdgISz5xihkORuVmnGLh3sowLCH3X77i CZxQy/OUHU2+o6FkRFPReiWlqNjP1Yzl/sSvRLLsnc6OV7YY5hZedBJYxKKgOMo+26 mQud2qKn+6DXw== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Vq2Sx5Vgkz4x20; Wed, 29 May 2024 18:23:13 +1000 (AEST) From: Michael Ellerman To: Muhammad Usama Anjum , linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org Cc: Muhammad Usama Anjum , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] selftests/openat2: Fix build warnings on ppc64 In-Reply-To: <94964224-1796-4610-a42d-3aacb4d47341@collabora.com> References: <20240521030325.58095-1-mpe@ellerman.id.au> <94964224-1796-4610-a42d-3aacb4d47341@collabora.com> Date: Wed, 29 May 2024 18:23:13 +1000 Message-ID: <87bk4p3u32.fsf@mail.lhotse> 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=utf-8 Content-Transfer-Encoding: quoted-printable Muhammad Usama Anjum writes: > I was looking at if we can add this flag for ppc64 for all selftests > somewhere. But there isn't any suitable place other than in KHDR_INCLUDES. > But there is a series already trying to add _GNU_SOURCE to it. IMHO adding other flags to KHDR_INCLUDES is not the right solution, it conflates unrelated things. Some tests may want the kernel headers but not _GNU_SOURCE, or vice versa. Adding a separate define for "standard kselftest flags" would be preferable, and then something like __SANE_USERSPACE_TYPES__ would make sense being added to it. > Reviewed-by: Muhammad Usama Anjum Thanks. cheers > On 5/20/24 8:03 PM, Michael Ellerman wrote: >> Fix warnings like: >>=20 >> openat2_test.c: In function =E2=80=98test_openat2_flags=E2=80=99: >> openat2_test.c:303:73: warning: format =E2=80=98%llX=E2=80=99 expects = argument of type >> =E2=80=98long long unsigned int=E2=80=99, but argument 5 has type =E2= =80=98__u64=E2=80=99 {aka =E2=80=98long >> unsigned int=E2=80=99} [-Wformat=3D] >>=20 >> By switching to unsigned long long for u64 for ppc64 builds. >>=20 >> Signed-off-by: Michael Ellerman >> --- >> tools/testing/selftests/openat2/openat2_test.c | 1 + >> 1 file changed, 1 insertion(+) >>=20 >> diff --git a/tools/testing/selftests/openat2/openat2_test.c b/tools/test= ing/selftests/openat2/openat2_test.c >> index 9024754530b2..5790ab446527 100644 >> --- a/tools/testing/selftests/openat2/openat2_test.c >> +++ b/tools/testing/selftests/openat2/openat2_test.c >> @@ -5,6 +5,7 @@ >> */ >>=20=20 >> #define _GNU_SOURCE >> +#define __SANE_USERSPACE_TYPES__ // Use ll64 >> #include >> #include >> #include > > --=20 > BR, > Muhammad Usama Anjum