From: Changbin Du <changbin.du@gmail.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Linux-Next Mailing List <linux-next@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
changbin.du@gmail.com
Subject: Re: linux-next: manual merge of the compiler-attributes tree with the kbuild tree
Date: Tue, 30 Oct 2018 15:04:13 +0000 [thread overview]
Message-ID: <20181030150412.peayixjav2lvbp4s@mail.google.com> (raw)
In-Reply-To: <CANiq72k2w2T0Cy0D--OEmE+sOPkjZtXpukBm+Mz1_xY6MCGg0A@mail.gmail.com>
On Tue, Oct 30, 2018 at 12:21:52PM +0100, Miguel Ojeda wrote:
> On Tue, Oct 30, 2018 at 12:49 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Hi all,
> >
> > On Tue, 30 Oct 2018 10:46:37 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > Today's linux-next merge of the compiler-attributes tree got a conflict
> > > in:
> > >
> > > include/linux/compiler-gcc.h
> > >
> > > between commit:
> > >
> > > 94c7dfd01652 ("kernel hacking: support building kernel with -Og optimization level")
> > >
> > > from the kbuild tree and commits:
> > >
> > > 5c67a52f3da0 ("Compiler Attributes: always use the extra-underscores syntax")
> > > 989bd5000f36 ("Compiler Attributes: remove unneeded sparse (__CHECKER__) tests")
> > >
> > > from the compiler-attributes tree.
> > >
> > > I fixed it up (the latter just removed the __CHECKER__ check, so I did
> > > that) and can carry the fix as necessary. This is now fixed as far as
> >
> > On reflection, that may not have been the correct resolution ...
>
> From a quick look, it seems we want:
>
> #ifndef CONFIG_CC_OPTIMIZE_FOR_DEBUGGING
> #define __compiletime_warning(message) __attribute__((__warning__(message)))
> #define __compiletime_error(message) __attribute__((__error__(message)))
> #endif
>
> i.e. kbuild tree added the CONFIG_CC_OPTIMIZE_FOR_DEBUGGING guard,
> while the compiler-attributes tree removed the __CHECKER__ one, so we
> still need the former.
>
> By the way, I think 94c7dfd01652 is wrong: it changes the guard also
> for __latent_entropy (and it does not change the corresponding comment
> at "#endif /* __CHECKER__ */").
>
> Also, the commit message does not mention __compiletime_warning --
> should that one be guarded too by CONFIG_CC_OPTIMIZE_FOR_DEBUGGING?
>
To avoid future possible warning, __compiletime_warning should also be
guarded. So I did the flow change so __latent_entropy is not affected.
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -85,9 +85,11 @@
#define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
-#if !defined(__CHECKER__) && !defined(CONFIG_CC_OPTIMIZE_FOR_DEBUGGING)
+#if !defined(__CHECKER__)
+#if !defined(CONFIG_CC_OPTIMIZE_FOR_DEBUGGING)
#define __compiletime_warning(message) __attribute__((warning(message)))
#define __compiletime_error(message) __attribute__((error(message)))
+#endif
#ifdef LATENT_ENTROPY_PLUGIN
#define __latent_entropy __attribute__((latent_entropy))
> Cheers,
> Miguel
--
Thanks,
Changbin Du
next prev parent reply other threads:[~2018-10-30 15:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-29 23:46 Stephen Rothwell
2018-10-29 23:49 ` Stephen Rothwell
2018-10-30 11:21 ` Miguel Ojeda
2018-10-30 15:04 ` Changbin Du [this message]
2018-10-30 15:53 ` Masahiro Yamada
2018-10-30 16:02 ` Stephen Rothwell
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=20181030150412.peayixjav2lvbp4s@mail.google.com \
--to=changbin.du@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=sfr@canb.auug.org.au \
--cc=yamada.masahiro@socionext.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®