lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a3YCKtkt2pHQZGg8SQsbdA2Ai3ZhxCGKToD2KVRHQgnrw@mail.gmail.com>
Date:   Wed, 29 Apr 2020 22:16:10 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     "Kazlauskas, Nicholas" <nicholas.kazlauskas@....com>
Cc:     Harry Wentland <harry.wentland@....com>,
        Leo Li <sunpeng.li@....com>,
        Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        "David (ChunMing) Zhou" <David1.Zhou@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
        Bhawanpreet Lakha <Bhawanpreet.Lakha@....com>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [v2] amdgpu: fix gcc-4.8 build warnings

On Wed, Apr 29, 2020 at 3:42 PM Kazlauskas, Nicholas
<nicholas.kazlauskas@....com> wrote:
>
> On 2020-04-29 5:20 a.m., Arnd Bergmann wrote:
> > Older compilers warn about initializers with incorrect curly
> > braces:
> >
> > drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_mst_dsc_aux_for_port':
> > drivers/gpu/drm/drm_dp_mst_topology.c:5497:9: error: missing braces around initializer [-Werror=missing-braces]
> >    struct drm_dp_desc desc = { 0 };
> >           ^
> >
> > Change all instances in the amd gpu driver to using the GNU empty
> > initializer extension.
>
> These should actually be memset - instead of GCC complaining, it'll be
> clang instead.

I'm not sure what you mean, clang certainly supports most GNU extensions,
and this one is used all over the kernel.

There is a good reason for using memset instead of ={}, e.g. when you want
to be sure that all padding fields get initialized before copying
stack variables
to user space, but I find it a little harder to read.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ