mbox series

[0/3] Resolve -Wattribute-alias warnings from SYSCALL_DEFINEx()

Message ID 20180616005323.7938-1-paul.burton@mips.com (mailing list archive)
Headers show
Series Resolve -Wattribute-alias warnings from SYSCALL_DEFINEx() | expand

Message

Paul Burton June 16, 2018, 12:53 a.m. UTC
This series introduces infrastructure allowing compiler diagnostics to
be disabled or their severity modified for specific pieces of code, with
suitable abstractions to prevent that code from becoming tied to a
specific compiler.

This infrastructure is then used to disable the -Wattribute-alias
warning around syscall definitions, which rely on type mismatches to
sanitize arguments.

Finally PowerPC-specific #pragma's are removed now that the generic code
is handling this.

The series takes Arnd's RFC patches & addresses the review comments they
received. The most notable effect of this series to to avoid warnings &
build failures caused by -Wattribute-alias when compiling the kernel
with GCC 8.

Applies cleanly atop master as of 9215310cf13b ("Merge
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net").

Thanks,
    Paul

Arnd Bergmann (2):
  kbuild: add macro for controlling warnings to linux/compiler.h
  disable -Wattribute-alias warning for SYSCALL_DEFINEx()

Paul Burton (1):
  Revert "powerpc: fix build failure by disabling attribute-alias
    warning in pci_32"

 arch/powerpc/kernel/pci_32.c   |  4 ---
 include/linux/compat.h         |  8 ++++-
 include/linux/compiler-gcc.h   | 66 ++++++++++++++++++++++++++++++++++
 include/linux/compiler_types.h | 18 ++++++++++
 include/linux/syscalls.h       |  4 +++
 5 files changed, 95 insertions(+), 5 deletions(-)

Comments

Stafford Horne June 17, 2018, 1:11 a.m. UTC | #1
On Fri, Jun 15, 2018 at 05:53:19PM -0700, Paul Burton wrote:
> This series introduces infrastructure allowing compiler diagnostics to
> be disabled or their severity modified for specific pieces of code, with
> suitable abstractions to prevent that code from becoming tied to a
> specific compiler.
> 
> This infrastructure is then used to disable the -Wattribute-alias
> warning around syscall definitions, which rely on type mismatches to
> sanitize arguments.
> 
> Finally PowerPC-specific #pragma's are removed now that the generic code
> is handling this.
> 
> The series takes Arnd's RFC patches & addresses the review comments they
> received. The most notable effect of this series to to avoid warnings &
> build failures caused by -Wattribute-alias when compiling the kernel
> with GCC 8.
> 
> Applies cleanly atop master as of 9215310cf13b ("Merge
> git://git.kernel.org/pub/scm/linux/kernel/git/davem/net").
> 
> Thanks,
>     Paul
> 
> Arnd Bergmann (2):
>   kbuild: add macro for controlling warnings to linux/compiler.h
>   disable -Wattribute-alias warning for SYSCALL_DEFINEx()
> 
> Paul Burton (1):
>   Revert "powerpc: fix build failure by disabling attribute-alias
>     warning in pci_32"
> 
>  arch/powerpc/kernel/pci_32.c   |  4 ---
>  include/linux/compat.h         |  8 ++++-
>  include/linux/compiler-gcc.h   | 66 ++++++++++++++++++++++++++++++++++
>  include/linux/compiler_types.h | 18 ++++++++++
>  include/linux/syscalls.h       |  4 +++
>  5 files changed, 95 insertions(+), 5 deletions(-)

Hello Paul,

I tested the series out with the new OpenRISC 9.0.0 port and the
-Wattribute-alias warnings are gone.  Thank you.

Using toolchain binaries from:
  https://github.com/stffrdhrn/gcc/releases/tag/or1k-9.0.0-20180613

For the series:

Tested-by: Stafford Horne <shorne@gmail.com>

-Stafford
Christophe Leroy June 18, 2018, 7 a.m. UTC | #2
Le 16/06/2018 à 02:53, Paul Burton a écrit :
> This series introduces infrastructure allowing compiler diagnostics to
> be disabled or their severity modified for specific pieces of code, with
> suitable abstractions to prevent that code from becoming tied to a
> specific compiler.
> 
> This infrastructure is then used to disable the -Wattribute-alias
> warning around syscall definitions, which rely on type mismatches to
> sanitize arguments.
> 
> Finally PowerPC-specific #pragma's are removed now that the generic code
> is handling this.
> 
> The series takes Arnd's RFC patches & addresses the review comments they
> received. The most notable effect of this series to to avoid warnings &
> build failures caused by -Wattribute-alias when compiling the kernel
> with GCC 8.
> 
> Applies cleanly atop master as of 9215310cf13b ("Merge
> git://git.kernel.org/pub/scm/linux/kernel/git/davem/net").
> 
> Thanks,
>      Paul
> 
> Arnd Bergmann (2):
>    kbuild: add macro for controlling warnings to linux/compiler.h
>    disable -Wattribute-alias warning for SYSCALL_DEFINEx()
> 
> Paul Burton (1):
>    Revert "powerpc: fix build failure by disabling attribute-alias
>      warning in pci_32"
> 
>   arch/powerpc/kernel/pci_32.c   |  4 ---
>   include/linux/compat.h         |  8 ++++-
>   include/linux/compiler-gcc.h   | 66 ++++++++++++++++++++++++++++++++++
>   include/linux/compiler_types.h | 18 ++++++++++
>   include/linux/syscalls.h       |  4 +++
>   5 files changed, 95 insertions(+), 5 deletions(-)
> 

Works well, thanks.

You can then also revert 	2479bfc9bc600dcce7f932d52dcfa8d677c41f93
("powerpc: Fix build by disabling attribute-alias warning for 
SYSCALL_DEFINEx")

Christophe
Arnd Bergmann June 18, 2018, 1:05 p.m. UTC | #3
On Sat, Jun 16, 2018 at 2:53 AM, Paul Burton <paul.burton@mips.com> wrote:
> This series introduces infrastructure allowing compiler diagnostics to
> be disabled or their severity modified for specific pieces of code, with
> suitable abstractions to prevent that code from becoming tied to a
> specific compiler.
>
> This infrastructure is then used to disable the -Wattribute-alias
> warning around syscall definitions, which rely on type mismatches to
> sanitize arguments.
>
> Finally PowerPC-specific #pragma's are removed now that the generic code
> is handling this.
>
> The series takes Arnd's RFC patches & addresses the review comments they
> received. The most notable effect of this series to to avoid warnings &
> build failures caused by -Wattribute-alias when compiling the kernel
> with GCC 8.
>
> Applies cleanly atop master as of 9215310cf13b ("Merge
> git://git.kernel.org/pub/scm/linux/kernel/git/davem/net").
>

Sorry I dropped the ball on this earlier, and thanks a lot for picking
it up again! From what I can tell, your version addresses all issues
I was aware of, so we should merge that.

      Arnd