Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bus: fsl-mc: properly empty-initialize structure

Use the proper form of the empty initializer when working with
structures that contain an array. Otherwise, older gcc versions (eg gcc
4.9) will complain about this.

Fixes: 1ac210d128ef ("bus: fsl-mc: add the fsl_mc_get_endpoint function")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Acked-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Link: https://lore.kernel.org/r/20191204142950.30206-1-ioana.ciornei@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ioana Ciornei and committed by
Greg Kroah-Hartman
cff081ea c576eddf

+3 -3
+3 -3
drivers/bus/fsl-mc/fsl-mc-bus.c
··· 715 715 struct fsl_mc_device *fsl_mc_get_endpoint(struct fsl_mc_device *mc_dev) 716 716 { 717 717 struct fsl_mc_device *mc_bus_dev, *endpoint; 718 - struct fsl_mc_obj_desc endpoint_desc = { 0 }; 719 - struct dprc_endpoint endpoint1 = { 0 }; 720 - struct dprc_endpoint endpoint2 = { 0 }; 718 + struct fsl_mc_obj_desc endpoint_desc = {{ 0 }}; 719 + struct dprc_endpoint endpoint1 = {{ 0 }}; 720 + struct dprc_endpoint endpoint2 = {{ 0 }}; 721 721 int state, err; 722 722 723 723 mc_bus_dev = to_fsl_mc_device(mc_dev->dev.parent);