Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp51404lqh; Mon, 6 May 2024 10:56:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/BRQP7h1xIHn+VNu7j8UfUW9GLg0Tpj9+92Yxy0WMBMfwcdy2O/b+TlzoEIHO8lj0lNNH0SXHf189o1Sm+VSNr6CT6akeeUL7PSbh4w== X-Google-Smtp-Source: AGHT+IGmvFSzT2Q+n7F2xo/oCW4aLpoEMYEtIcb33Kiw6sO6jqMpksRHX5X2eQ5n4yszMoCS7lMT X-Received: by 2002:a50:d65c:0:b0:56b:829a:38e3 with SMTP id c28-20020a50d65c000000b0056b829a38e3mr8186800edj.16.1715018215155; Mon, 06 May 2024 10:56:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715018215; cv=pass; d=google.com; s=arc-20160816; b=pWtMXgZGf6/CtuEtweTODwKj9OAvVQWu7cEUJmgYISoGAoSBWn0++7Roz5sAmBbPa6 KLy3WTob4WM04D2EJnxont/jk9SOUPQR2+4q3Dl8gukO+Z/TduOSjnq9zpMc/G2Djx7G BPVBVqdntuin5D7qBwIbd/H6uQLviGcPXl1xaDje45yZtKy1O8G48zjt7xvEV+fxbA1N KzHkBC9CwhAsAgtTBDfGfcuR4tUV22Ty27rjIiWdc/B51JiSsw1Mr/C0kY3GH/t5Zk15 gh77dZbwGJBhgF0sTqAv1Slunkka2j3i2iDijg2FXiO5bT8l+FM31VJyAbBsnZCRXCJ+ Riaw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=auey9nkmX+o6J4bdv2HNYi8o5gf1X6CfZVTy70WWjrc=; fh=6lxJ9aHNWduyXLLLbvBceITVPTGbA4gLWM+JurwTgOA=; b=0KFPaRAHm06EoVL91XqEKrCseZvz+N0dzMmYl/6NRsxPNPj2IlaM/HJY2pBjLJR66V NPwWAAfZsbS6QX5WH2RV79P6i8YQ2RaXhqZutOLYUkotapQtxbJy/0Wj4gYe9UIAaFeP bXocdAPHW3fbuxDL1zBD34AmzTupGEpFl0pvNVc1OlB/vLZ6nO4QG5TwgFRK3kKbKWFP jHuhyXRCkJjxZ/vFEld6MFiFboq3dJKjH9GCs+y9vtnWn2EjPHfzkVNj4ype1Yy0mWDH nf4nnul+u2vHfdBhBx2DguN9IDk+N264B+SE8GolLnBtW1hgV62eqG8AA+kNfwc2eEUM DOOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RE81h80X; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id p8-20020a056402074800b00572b21818e7si4518832edy.458.2024.05.06.10.56.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 10:56:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170259-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=@kernel.org header.s=k20201202 header.b=RE81h80X; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 am.mirrors.kernel.org (Postfix) with ESMTPS id A858F1F22F75 for ; Mon, 6 May 2024 17:56:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B62221586DB; Mon, 6 May 2024 17:56:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RE81h80X" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CE9E2158200; Mon, 6 May 2024 17:56:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715018207; cv=none; b=Mon7HHnVmYMWSoL5kj2v1UzzgPaHskNnhV8pmq+awwVqOBjGDYYsfVA4pG+wZIuYTgpGxD84TmuVMScFP+bP+IIApqRlr6YNZ+Ud9PxlX/URcv+atw3uQluKEM+5dmFNGwtoL8wTgrxP0PlM1JBUcWiXUjO0zpMPQ2g7vdj7ZuU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715018207; c=relaxed/simple; bh=9mKo27o9TugRDuPDvKi8KCJG46tdt7CPVGlhj/hGQuM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jD3hvmB+MCGGMaIX34S/+RfvjjekycI9q4PYVr7WvRFZYrFXxI9iHSYMk6v1yRQXa+ka9yrB3r8d55j03aGdBlu9zqIu5OlTm2vDx901Zsuo7JDj/r6CqgVEPrnB7hzl/24uNicZbAwA3i1Sg1pTfukGcCW8wEB0PwhyS54XnZI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RE81h80X; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0081C116B1; Mon, 6 May 2024 17:56:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715018207; bh=9mKo27o9TugRDuPDvKi8KCJG46tdt7CPVGlhj/hGQuM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RE81h80XEWfTzMbvbgl91Sng1WZHP83i9T4dTDNtFKECcRQVAByctgVnf9dlyDG9G iB6QJbJCxXHbQFB3wREOI+EkoF42q6ku2IdHNNECmw8UcSQcqbSqma2HZn2MQ5dE3B umxOeDnKbxxcJI99YJlswFwS3TdUqC4vvwH9zaJvfWa9SnTuApr6eNR8s/NXX/Bps7 k33yCSJDzU1LztFp7bCmMc2kf0tSOu9i5tNAAfdGWaxM+etlJ6GMiLJWgYSMBmcl3C wrxIIwHw/udpDUPW1NvsVplpbEytKkxpTedLdS6a6dife67/slm+TdbFfmWKORBAH7 xhsY8XMbiYf1Q== Date: Mon, 6 May 2024 10:56:45 -0700 From: Nathan Chancellor To: Miguel Ojeda Cc: Yury Norov , Kuan-Wei Chiu , kernel test robot , llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Miguel Ojeda , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 1/2] lib/test_bitops: Add benchmark test for fns() Message-ID: <20240506175645.GB1425562@thelio-3990X> References: <20240502092443.6845-2-visitorckw@gmail.com> <202405030808.UsoMKFNP-lkp@intel.com> <20240503041701.GA3660305@thelio-3990X> <20240503155401.GA3960118@thelio-3990X> 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Sun, May 05, 2024 at 12:42:53PM +0200, Miguel Ojeda wrote: > On Fri, May 3, 2024 at 11:56 PM Yury Norov wrote: > > > > + * The __used attribute guarantees that the attributed variable will be > > We should probably mention functions as Nathan said (unless it does > not work for some reason). Yeah, it should work for functions. I think clarifying it will not work for local variables would probably be good as well, since __used__ does not work on those like I replied in my other email, but it is not that big of a deal. > > + * is actually used. It's a compiler implementation details either emit > > + * the warning in that case or not. > > Is it an implementation detail or rather that they took different > alternatives/options on purpose (even if not documented)? If we think > it is just a consequence of their implementation, perhaps we should > mention that and what GCC/Clang do today in their latest version, in > case it changes (so that we know whether we need to remove the macro, > for instance). Yeah it is entirely possible that this is not intentional but when -Wunused-but-set-variable was introduced in Clang, I know there was a lot of discussion around making the warning match GCC in certain ways as well as breaking from GCC in others. I have not tried to dig up those discussions to confirm though. Cheers, Nathan