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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 17 Nov 2019 19:42:48 +0000
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     Ioana Ciornei <ioana.ciornei@....com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        laurentiu.tudor@....com, andrew@...n.ch, f.fainelli@...il.com
Subject: Re: [PATCH net-next v4 2/5] bus: fsl-mc: add the fsl_mc_get_endpoint
 function

On Thu, Oct 31, 2019 at 01:18:29AM +0200, Ioana Ciornei wrote:
> Using the newly added fsl_mc_get_endpoint function a fsl-mc driver can
> find its associated endpoint (another object at the other link of a MC
> firmware link).
> 
> The API will be used in the following patch in order to discover the
> connected DPMAC object of a DPNI.
> 
> Also, the fsl_mc_device_lookup function is made available to the entire
> fsl-mc bus driver and not just for the dprc driver.
> 
> Signed-off-by: Ioana Ciornei <ioana.ciornei@....com>

When building this with gcc 4.9.2, I get these warnings:

drivers/bus/fsl-mc/fsl-mc-bus.c: In function 'fsl_mc_get_endpoint':
drivers/bus/fsl-mc/fsl-mc-bus.c:718:9: warning: missing braces around initializer [-Wmissing-braces]
  struct fsl_mc_obj_desc endpoint_desc = { 0 };
         ^
drivers/bus/fsl-mc/fsl-mc-bus.c:718:9: warning: (near initialization for 'endpoint_desc.type') [-Wmissing-braces]
drivers/bus/fsl-mc/fsl-mc-bus.c:719:9: warning: missing braces around initializer [-Wmissing-braces]
  struct dprc_endpoint endpoint1 = { 0 };
         ^
drivers/bus/fsl-mc/fsl-mc-bus.c:719:9: warning: (near initialization for 'endpoint1.type') [-Wmissing-braces]
drivers/bus/fsl-mc/fsl-mc-bus.c:720:9: warning: missing braces around initializer [-Wmissing-braces]
  struct dprc_endpoint endpoint2 = { 0 };
         ^
drivers/bus/fsl-mc/fsl-mc-bus.c:720:9: warning: (near initialization for 'endpoint2.type') [-Wmissing-braces]

This seems to be a legit complaint - the first member of these is a
char array, and initialising an array with an integer 0 has provoked
this and previous versions of GCC to complain.

Both GCC and Clang support the empty initialiser, despite not being
valid C99.  If you want to be C99 compliant, the alternative is to
explicitly memset() these structures.

In all these cases, the CPU has to do work to set these structures to
zero (using memset() will also get any padding too.)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

Powered by blists - more mailing lists