Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp5239lqh; Thu, 30 May 2024 12:07:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUhPAjkxz/6b2rwrhhUlFdv/A679aY0ni5h+C9KfzEvxqnLfgPEwJAGGVdUxNaL6uGaCjWzXuj3AHE4rE/S6WWl0cdwSdAt4g2RBkgdkQ== X-Google-Smtp-Source: AGHT+IEDcld49eQCnD1AtMCppaRUxHMMeCtStPaAiXosl8kBlqilS6VKly5jAazKN2dHy2MmG0v3 X-Received: by 2002:a05:6a21:170f:b0:1b1:d402:a93f with SMTP id adf61e73a8af0-1b26458b4fbmr3324290637.37.1717096060619; Thu, 30 May 2024 12:07:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717096060; cv=pass; d=google.com; s=arc-20160816; b=l7T+fIdaQ3rsyuDtQN/LkSad9KBM108FdMnSsdfdytnc95cqaEBoe9L5yjnnh4VvIL As6KPxx8m9ElKXnU3ZMGRvoZ66i1KX3BJtzchqF8JfPeSaLfccTRiWqTF6DU74EVb871 txxrVvtE9HbciRLYyqWKC9NlDh9N36bdjuA/jLWPVHdbMOP8nv3HAD3x7MYxpOC5w9QW g8Wu0o9PtX0fWjlqWYUMF+fwtB5tasesw5sEpUBhrz8v/S2quUFpMip15uThcKhRSaV1 yyqP1RksnVGGK7tHr26U2DmlHUu7c3/DnC7L9wnV15BtaGxKH11Vga/fJBtGr9mVd/oQ xYEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=+bUYnIhpz2h+On3VZsj3Zd6/727awMN92YMgceCOy3k=; fh=lentDAHh7nsexp2HiZa/avM6cb57qVVUO1gebpqTdhk=; b=mN7UZwOqmYvW11aVdOGVcUYvxSVNiqx4C2e8xWZQdsXCmbx9GkTaSR9L5F/RtYuJ/F dGQB2pS2kViYv5EuUbWV2bST5xzifHO6VJ6PSb1tMJjHw439q1pnV+EEl8grVVso3DkZ OmovCWapGOOHUkCITLM+r41Xa5/d1kcFVcOs/R7OjWevEm8G3HOsY4+PFn4p1KQZntiv X5jkp+mCjLhe+rvbhZRs34Eatx/NDFGKQyqQv9M7sPXLpQRG280bKgO6msDa7ribuHBa 3yiKSuf/LTv4IhFxzHJK6xCTpxQsXLMzvR8XMl36P/QaoKGlA7h553PnvxdFYj+8BFlT MK4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=QTfwsmWE; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linuxfoundation.org dmarc=pass fromdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-195807-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195807-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35c181aa0si135989a12.658.2024.05.30.12.07.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 12:07:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195807-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=QTfwsmWE; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linuxfoundation.org dmarc=pass fromdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-195807-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195807-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3C590282A02 for ; Thu, 30 May 2024 19:07:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 916106BB56; Thu, 30 May 2024 19:07:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="QTfwsmWE" Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) (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 4FE6D60DE9 for ; Thu, 30 May 2024 19:07:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717096054; cv=none; b=k0Fbw8mj0sHr1B+SREfLzAygpXQS3kJh8TKMPq3JAFt4O+uMnYRYSuokonAOlVYAUJpZWaHzHrp0WwuIDngCSozOJKwjFoOxDsKWRJSbKOqDANxSUYfE+rqvnRyhvk6cnQcxmP9OCevpN1bHtQsL5gnE4aH5OTc+zlM8D+Ci9+M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717096054; c=relaxed/simple; bh=imZhQcOLo/A57RIklfhNXDPLYJZwF4mjSMXlBfn4bjA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MKpZgfZAsjD/ZWAiajANzKTnykMMrYHepMJKryn9IjRHmFXz2kHQnIhAcLSp2q1FTCy//Vfu8iWNgQWz0XH1arMDNL+ktCbxZ+/bhKvqW/TMkbWnLfElfMtEqwi2nTp76Nx3EyShzMz3b4RNcDW9mnN7jjwAJ3zvHGshXPbuXxI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QTfwsmWE; arc=none smtp.client-ip=209.85.166.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-il1-f180.google.com with SMTP id e9e14a558f8ab-3737ee27cb9so668605ab.2 for ; Thu, 30 May 2024 12:07:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1717096052; x=1717700852; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=+bUYnIhpz2h+On3VZsj3Zd6/727awMN92YMgceCOy3k=; b=QTfwsmWEN4YXPGyWZyNfv8HoVgJhfzs9XxySraioDrTV7REQ8szrv/Y3wp95Ghij0x c1mBg+fHrBzs0sX6viDhM+XerI2Ku40nZO3P4FIZnu8cObFx15MSp0/8Klgad1ogZypd 7Obwi9vsXY8i2DSCI/65bVKu1Orzqhp4ll32E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717096052; x=1717700852; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+bUYnIhpz2h+On3VZsj3Zd6/727awMN92YMgceCOy3k=; b=xVRcT76/0QIJTv02fPaZ+L+5N3i1357s5S3x9RsQ8hd/gQwB6JhNaB2pWToMgRBwYZ xobGddNLLVpHAeGpX2y7D1y010mg4Cg/ucrgt6kcZKSrp1H8wETSHaXKEe6b8+PEDVvJ 8Rq8ixUH7lJ0EeQJls3znRWzoP0uPAolVxlM+Ls+RkubcGrJs+jk8TprchnbmeXHV23d Ail9aQl5kDXrcS79eK56hy7Cz87HNs5NyT0uDIE71GpEADcXVxEbVoPE74fGra1vlNXJ zrKkiREGhSMtlPagBGAPeZPZDh3qBOBilGvEEGMYckfvoqsXftfgfADznWdAkBGzI62G Uh4A== X-Forwarded-Encrypted: i=1; AJvYcCWPtGwPQutD17Zq4XZvVsdTpGpNYDGqGuhGHTEZcRcb9fOdMoSNTVA50fxId6H4xmLsr2vL6GgEkI5mnryvT4JEjACCFsa11mqZ+F8Q X-Gm-Message-State: AOJu0YwFXMkyjplVRR6YGAuENWEvqBC3duxa+LnEdyZ+vWG7WigmtTw9 uGpT6rSiCQ5jgDEmjife6WmUFIJDJQWAx4uZhfxClbEeUpz8M9RhpOl1ACSpeMY= X-Received: by 2002:a5d:8601:0:b0:7d9:eeb8:ddeb with SMTP id ca18e2360f4ac-7eaf5d91d5fmr333582139f.2.1717096052448; Thu, 30 May 2024 12:07:32 -0700 (PDT) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b48764e4b8sm67181173.35.2024.05.30.12.07.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 May 2024 12:07:32 -0700 (PDT) Message-ID: Date: Thu, 30 May 2024 13:07:31 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/3] selftests/futex: pass _GNU_SOURCE without a value to the compiler To: John Hubbard , Shuah Khan Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , Edward Liaw , =?UTF-8?Q?Andr=C3=A9_Almeida?= , "Nysal Jan K . A" , Mark Brown , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, Shuah Khan References: <20240529022938.129624-1-jhubbard@nvidia.com> <20240529022938.129624-4-jhubbard@nvidia.com> Content-Language: en-US From: Shuah Khan In-Reply-To: <20240529022938.129624-4-jhubbard@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/28/24 20:29, John Hubbard wrote: > It's slightly better to set _GNU_SOURCE in the source code, but if one > must do it via the compiler invocation, then the best way to do so is > this: > > $(CC) -D_GNU_SOURCE= > > ...because otherwise, if this form is used: > > $(CC) -D_GNU_SOURCE > > ...then that leads the compiler to set a value, as if you had passed in: > > $(CC) -D_GNU_SOURCE=1 > > That, in turn, leads to warnings under both gcc and clang, like this: > > futex_requeue_pi.c:20: warning: "_GNU_SOURCE" redefined > > Fix this by using the "-D_GNU_SOURCE=" form. > > Reviewed-by: Edward Liaw > Reviewed-by: Davidlohr Bueso > Signed-off-by: John Hubbard > --- > tools/testing/selftests/futex/functional/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile > index a392d0917b4e..994fa3468f17 100644 > --- a/tools/testing/selftests/futex/functional/Makefile > +++ b/tools/testing/selftests/futex/functional/Makefile > @@ -1,6 +1,6 @@ > # SPDX-License-Identifier: GPL-2.0 > INCLUDES := -I../include -I../../ $(KHDR_INCLUDES) > -CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) $(KHDR_INCLUDES) > +CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE= -pthread $(INCLUDES) $(KHDR_INCLUDES) > LDLIBS := -lpthread -lrt > > LOCAL_HDRS := \ This looks fine. Applied now to linux-kselftest fixes branch thanks, -- Shuah