linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: menglong8.dong@gmail.com
Cc: kuba@kernel.org, ojeda@kernel.org, ndesaulniers@google.com,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	asml.silence@gmail.com, imagedong@tencent.com,
	luiz.von.dentz@intel.com, vasily.averin@linux.dev,
	jk@codeconstruct.com.au, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH net-next v3] net: skb: prevent the split of kfree_skb_reason() by gcc
Date: Mon, 15 Aug 2022 13:52:30 +0200	[thread overview]
Message-ID: <CANiq72=01dzC5zs6-7Y4qrKYoFE1JpKes0ykN+x=FgGSmt9PCg@mail.gmail.com> (raw)
In-Reply-To: <20220815062727.1203589-1-imagedong@tencent.com>

On Mon, Aug 15, 2022 at 8:27 AM <menglong8.dong@gmail.com> wrote:
>
>  include/linux/compiler-gcc.h   | 12 ++++++++++++
>  include/linux/compiler_types.h |  4 ++++

No, this should be in `compiler_attributes.h` like you had it before.

To be clear, what you did here would be fine, but it is the "old way"
(we added `compiler_attributes.h` to reduce the complexity of
`compiler-*` and `compiler_types.h` and make it a bit more
normalized).

Please take a moment and read how other attributes do it in
`compiler_attributes.h` with `__has_attribute`. Check, for instance,
`__copy`, which is very similar to your case (not supported by Clang
and ICC, except in your case GCC always supports at least since 5.1).

Cheers,
Miguel

  reply	other threads:[~2022-08-15 11:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15  6:27 [PATCH net-next v3] net: skb: prevent the split of kfree_skb_reason() by gcc menglong8.dong
2022-08-15 11:52 ` Miguel Ojeda [this message]
2022-08-16  3:30   ` Menglong Dong

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='CANiq72=01dzC5zs6-7Y4qrKYoFE1JpKes0ykN+x=FgGSmt9PCg@mail.gmail.com' \
    --to=miguel.ojeda.sandonis@gmail.com \
    --cc=asml.silence@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=imagedong@tencent.com \
    --cc=jk@codeconstruct.com.au \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=luiz.von.dentz@intel.com \
    --cc=menglong8.dong@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vasily.averin@linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).