[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADxym3YnD=eP4n_RCrKy67z55e=tQZDNuJUw9hpTKZ6JNwspaA@mail.gmail.com>
Date: Tue, 16 Aug 2022 11:30:42 +0800
From: Menglong Dong <menglong8.dong@...il.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: kuba@...nel.org, ojeda@...nel.org, ndesaulniers@...gle.com,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
asml.silence@...il.com, imagedong@...cent.com,
luiz.von.dentz@...el.com, vasily.averin@...ux.dev,
jk@...econstruct.com.au, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH net-next v3] net: skb: prevent the split of
kfree_skb_reason() by gcc
On Mon, Aug 15, 2022 at 7:52 PM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> On Mon, Aug 15, 2022 at 8:27 AM <menglong8.dong@...il.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).
>
Okay, I think I'm getting it now! Thank you, and I'm sending the V4.
Menglong Dong
> Cheers,
> Miguel
Powered by blists - more mailing lists