[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-4.15] arm: replace typeof() with __typeof__()


  • To: Elliott Mitchell <ehem+xen@xxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 10 Mar 2021 08:49:07 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CpZtEeIqrPtN0Q79N5PPXnH4BaXxQ3jqSvohJqdn32s=; b=TE6M05wB/WQSLGOBA5dKoOILJPy79tBO3tgRg7I63p+lOcBzPN4qK5aZ3QGZ0FPQ98UG2ltLJ0ZZ3vsutw4sgcIAqjl+d4gBUZDKDvm2Y5BUHNvr0sqQc8El4PSlgPtaF+npSU79XM5sVbP7TPM+jqq5KAT/21HhbWspa/a6d/fFAm5Nn8GOu3EqNaDmW30FudmpX6AI68rSdDuVpL0XAprYtTLmibJeXqtpebiN2bhy04s7+uR8/VZXSHPDLYWbzvrgpRfjPhpdEu7EX+Lfp3LynMIuP5g562k7FryO/sPMHG9JFpDsR0yqDlom1lZbyGonSOLbQW/Nq25ei2ULuw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N7btv2Qd42rbZliF43n4ZYUHkQZL5Sg4LAII7vayZpHkt0eCX6zUl6gM1yxVX7yHLRgtvDp9zh8xv+DSi5JmQKC5g/3Sq9GlGQENiKb0Y1KvWlcrWmr3h7ZJoYO78fXlA4BsOvJXX1OIaiA72NnY29Ta2/bMhFqBhk1FTOB69HJiLDbpHcT1/CbQJN4FZHjemPT47YwkVT0dxC+o2hpwDgJtdF5B8eeQddmC9MyNCbcbQ2yKc36eGOKKx8/EjV/Z7LElGkrhFG7908aSxfTCO1Yy9Zr/VCV+Q1sgONgdqh9HigRSPz38ID/nvfHkFyOHZCTpGzALmYeVApZ5hjD+zg==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Wed, 10 Mar 2021 07:49:55 +0000
  • Ironport-sdr: diq+iEhyD8zUhnkJhgA8xdr37BCoGItms7uLOMYaku9XkEvkx7/9uNmepFYrV5lkOGFeX2RV7e QCpg3M/sRQa3JGiEysyHF0aIGtKHqa2K6rUinytAmZ5Yr4dT3A+rg8FlFxAvuRhKIbL1ymWwO2 oX+5J/GsTntvqPE4RZoq87NFyoZXNWKuVa2On4PlwQVLvqtFIRcZVex8+QmOKEHtkNq7aLXksC xRPFreTB2nKeOMWfcIK8GMO64nvRVOTrsNs4I7ylOiXiYBvKIkD1vC1QeLBiImqEjYuXcpjJn1 2CA=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Mar 09, 2021 at 07:24:32PM -0800, Elliott Mitchell wrote:
> On Tue, Mar 09, 2021 at 09:27:34PM +0000, Andrew Cooper wrote:
> > On 08/03/2021 13:36, Elliott Mitchell wrote:
> > > typeof() is available in Xen's build environment, which uses Xen's
> > > compiler.  As these headers are public, they need strict standards
> > > conformance.  Only __typeof__() is officially standardized.
> > >
> > > A compiler in standards conformance mode should report:
> > >
> > > warning: implicit declaration of function 'typeof' is invalid in C99
> > > [-Wimplicit-function-declaration]
> > >
> > > (this has been observed with FreeBSD's kernel build environment)
> > >
> > > Based-on-patch-by: Julien Grall <julien@xxxxxxx>, Sun Oct 4 20:33:04 2015 
> > > +0100
> > > Signed-off-by: Elliott Mitchell <ehem+xen@xxxxxxx>
> > 
> > s!arm!xen/public! in the subject seeing as two thirds of the
> > modifications are in non-ARM headers.
> 
> Gah!  Crucial little detail missing when rewriting the subject line.
> Julien Grall's original patch/commit only did ARM, but when I checked I
> found the other two and I did them too.
> 
> 
> > Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> > 
> > This wants backporting as a build fix, so should be considered for 4.15
> > at this point.
> > 
> > I wonder why our header checks don't pick this up.?? Do we need to throw
> > a -pedantic around?
> 
> This came up since FreeBSD's kernel build uses Clang with
> -std=iso9899:1999.  When I found FreeBSD was simply copying Xen's headers
> it was clear this needed to be *here*.

FTR this was never spotted on x86 because we don't make use of any of
the macros that use typeof in the kernel. Arm OTOH has a typeof in
set_xen_guest_handle_raw which is used by kernel code.

Thanks for fixing those.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.