LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* linux-next: manual merge of the compiler-attributes tree with the kbuild tree
@ 2018-10-29 23:46 Stephen Rothwell
  2018-10-29 23:49 ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2018-10-29 23:46 UTC (permalink / raw)
  To: Miguel Ojeda, Masahiro Yamada
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Changbin Du

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

Hi Miguel,

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
linux-next is concerned, but any non trivial conflicts should be mentioned
to your upstream maintainer when your tree is submitted for merging.
You may also want to consider cooperating with the maintainer of the
conflicting tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the compiler-attributes tree with the kbuild tree
  2018-10-29 23:46 linux-next: manual merge of the compiler-attributes tree with the kbuild tree Stephen Rothwell
@ 2018-10-29 23:49 ` Stephen Rothwell
  2018-10-30 11:21   ` Miguel Ojeda
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2018-10-29 23:49 UTC (permalink / raw)
  To: Miguel Ojeda, Masahiro Yamada
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Changbin Du

[-- Attachment #1: Type: text/plain, Size: 843 bytes --]

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 ...

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the compiler-attributes tree with the kbuild tree
  2018-10-29 23:49 ` Stephen Rothwell
@ 2018-10-30 11:21   ` Miguel Ojeda
  2018-10-30 15:04     ` Changbin Du
  2018-10-30 16:02     ` Stephen Rothwell
  0 siblings, 2 replies; 6+ messages in thread
From: Miguel Ojeda @ 2018-10-30 11:21 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Masahiro Yamada, Linux-Next Mailing List, linux-kernel, changbin.du

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?

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the compiler-attributes tree with the kbuild tree
  2018-10-30 11:21   ` Miguel Ojeda
@ 2018-10-30 15:04     ` Changbin Du
  2018-10-30 15:53       ` Masahiro Yamada
  2018-10-30 16:02     ` Stephen Rothwell
  1 sibling, 1 reply; 6+ messages in thread
From: Changbin Du @ 2018-10-30 15:04 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Stephen Rothwell, Masahiro Yamada, Linux-Next Mailing List,
	linux-kernel, changbin.du

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the compiler-attributes tree with the kbuild tree
  2018-10-30 15:04     ` Changbin Du
@ 2018-10-30 15:53       ` Masahiro Yamada
  0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2018-10-30 15:53 UTC (permalink / raw)
  To: Changbin Du
  Cc: Miguel Ojeda, Stephen Rothwell, Linux-Next Mailing List,
	Linux Kernel Mailing List

On Wed, Oct 31, 2018 at 12:06 AM Changbin Du <changbin.du@gmail.com> wrote:
>
> 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))
>


OK, I locally fixed it up.

I hope it will be fine for tomorrow's linux-next

Thanks.

-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: manual merge of the compiler-attributes tree with the kbuild tree
  2018-10-30 11:21   ` Miguel Ojeda
  2018-10-30 15:04     ` Changbin Du
@ 2018-10-30 16:02     ` Stephen Rothwell
  1 sibling, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2018-10-30 16:02 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Masahiro Yamada, Linux-Next Mailing List, linux-kernel, changbin.du

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

Hi Miguel,

On Tue, 30 Oct 2018 12:21:52 +0100 Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:
>
> 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

Thanks, I will use that resolution.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-30 16:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-29 23:46 linux-next: manual merge of the compiler-attributes tree with the kbuild tree Stephen Rothwell
2018-10-29 23:49 ` Stephen Rothwell
2018-10-30 11:21   ` Miguel Ojeda
2018-10-30 15:04     ` Changbin Du
2018-10-30 15:53       ` Masahiro Yamada
2018-10-30 16:02     ` Stephen Rothwell

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).