All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Yury Norov <yury.norov@gmail.com>,
	Kuan-Wei Chiu <visitorckw@gmail.com>,
	kernel test robot <lkp@intel.com>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Miguel Ojeda <ojeda@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 1/2] lib/test_bitops: Add benchmark test for fns()
Date: Mon, 6 May 2024 10:56:45 -0700	[thread overview]
Message-ID: <20240506175645.GB1425562@thelio-3990X> (raw)
In-Reply-To: <CANiq72mYPV_rNFirr1q=hjjz2yDzw98qrwqY5c14G3odt+shcA@mail.gmail.com>

On Sun, May 05, 2024 at 12:42:53PM +0200, Miguel Ojeda wrote:
> On Fri, May 3, 2024 at 11:56 PM Yury Norov <yury.norov@gmail.com> 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

  reply	other threads:[~2024-05-06 17:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02  9:24 [PATCH v5 0/2] bitops: Optimize fns() for improved performance Kuan-Wei Chiu
2024-05-02  9:24 ` [PATCH v5 1/2] lib/test_bitops: Add benchmark test for fns() Kuan-Wei Chiu
2024-05-03  0:49   ` kernel test robot
2024-05-03  1:34     ` Kuan-Wei Chiu
2024-05-03  4:17       ` Nathan Chancellor
2024-05-03  7:31         ` Kuan-Wei Chiu
2024-05-03  7:38           ` Kuan-Wei Chiu
2024-05-03 15:54             ` Nathan Chancellor
2024-05-03 21:55               ` Yury Norov
2024-05-03 22:23                 ` Nathan Chancellor
2024-05-05 10:42                   ` Miguel Ojeda
2024-05-06 17:52                     ` Nathan Chancellor
2024-05-06 18:08                       ` Miguel Ojeda
2024-05-06 22:47                         ` Yury Norov
2024-05-07 14:19                           ` Nathan Chancellor
2024-05-05 10:42                 ` Miguel Ojeda
2024-05-06 17:56                   ` Nathan Chancellor [this message]
2024-05-02  9:24 ` [PATCH v5 2/2] bitops: Optimize fns() for improved performance Kuan-Wei Chiu
2024-05-02 14:55 ` [PATCH v5 0/2] " Yury Norov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240506175645.GB1425562@thelio-3990X \
    --to=nathan@kernel.org \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=morbo@google.com \
    --cc=ndesaulniers@google.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ojeda@kernel.org \
    --cc=visitorckw@gmail.com \
    --cc=yury.norov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.