From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
To: Ioana Ciornei <ioana.ciornei@nxp.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] bus: fsl-mc: properly empty-initialize structure
Date: Wed, 4 Dec 2019 15:01:18 +0000 [thread overview]
Message-ID: <d73e2812-c53e-c480-2c61-b2c57c3c193d@nxp.com> (raw)
In-Reply-To: <20191204142950.30206-1-ioana.ciornei@nxp.com>
On 04.12.2019 16:29, Ioana Ciornei wrote:
> 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>
Thanks,
Acked-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
---
Best Regards, Laurentiu
> ---
> drivers/bus/fsl-mc/fsl-mc-bus.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c
> index a07cc19becdb..c78d10ea641f 100644
> --- a/drivers/bus/fsl-mc/fsl-mc-bus.c
> +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
> @@ -715,9 +715,9 @@ EXPORT_SYMBOL_GPL(fsl_mc_device_remove);
> struct fsl_mc_device *fsl_mc_get_endpoint(struct fsl_mc_device *mc_dev)
> {
> struct fsl_mc_device *mc_bus_dev, *endpoint;
> - struct fsl_mc_obj_desc endpoint_desc = { 0 };
> - struct dprc_endpoint endpoint1 = { 0 };
> - struct dprc_endpoint endpoint2 = { 0 };
> + struct fsl_mc_obj_desc endpoint_desc = {{ 0 }};
> + struct dprc_endpoint endpoint1 = {{ 0 }};
> + struct dprc_endpoint endpoint2 = {{ 0 }};
> int state, err;
>
> mc_bus_dev = to_fsl_mc_device(mc_dev->dev.parent);
>
prev parent reply other threads:[~2019-12-04 15:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-04 14:29 [PATCH] bus: fsl-mc: properly empty-initialize structure Ioana Ciornei
2019-12-04 15:01 ` Laurentiu Tudor [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d73e2812-c53e-c480-2c61-b2c57c3c193d@nxp.com \
--to=laurentiu.tudor@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=ioana.ciornei@nxp.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).