public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Laurentiu Tudor <laurentiu.tudor@nxp•com>
To: Arnd Bergmann <arnd@arndb•de>, Stuart Yoder <stuyoder@gmail•com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation•org>
Cc: "devicetree@vger•kernel.org" <devicetree@vger•kernel.org>,
	Rob Herring <robh+dt@kernel•org>,
	Frank Rowand <frowand.list@gmail•com>,
	"linuxppc-dev@lists•ozlabs.org" <linuxppc-dev@lists•ozlabs.org>,
	"linux-arm-kernel@lists•infradead.org"
	<linux-arm-kernel@lists•infradead.org>,
	German Rivera <german.rivera@nxp•com>,
	Itai Katz <itai.katz@nxp•com>,
	Ramiro Oliveira <Ramiro.Oliveira@synopsys•com>,
	"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
	"devel@driverdev•osuosl.org" <devel@driverdev•osuosl.org>
Subject: Re: [PATCH] staging: fsl-mc: fix warning in DT ranges parser
Date: Tue, 28 Feb 2017 10:34:02 +0000	[thread overview]
Message-ID: <58B55219.4070509@nxp.com> (raw)
In-Reply-To: <20170227204235.3547639-1-arnd@arndb.de>

Hi Arnd,

On 02/27/2017 10:42 PM, Arnd Bergmann wrote:
> The fsl-mc-bus driver in staging contains a copy of the standard
> 'ranges' property parsing algorithm with a hack to treat a missing
> property the same way as an empty one. This code produces false-positive
> warnings for me in an allmodconfig build:
>
> drivers/staging/fsl-mc/bus/fsl-mc-bus.c: In function 'fsl_mc_bus_probe':
> drivers/staging/fsl-mc/bus/fsl-mc-bus.c:645:6: error: 'mc_size_cells' may=
 be used uninitialized in this function [-Werror=3Dmaybe-uninitialized]
> drivers/staging/fsl-mc/bus/fsl-mc-bus.c:682:8: error: 'mc_addr_cells' may=
 be used uninitialized in this function [-Werror=3Dmaybe-uninitialized]
> drivers/staging/fsl-mc/bus/fsl-mc-bus.c:644:6: note: 'mc_addr_cells' was =
declared here
> drivers/staging/fsl-mc/bus/fsl-mc-bus.c:684:8: error: 'paddr_cells' may b=
e used uninitialized in this function [-Werror=3Dmaybe-uninitialized]
> drivers/staging/fsl-mc/bus/fsl-mc-bus.c:643:6: note: 'paddr_cells' was de=
clared here
>
> To avoid the warnings, I'm simplifying the argument handling to pass
> the number of valid ranges in the property as the function return code
> rather than passing it by reference. With this change, gcc can see that
> we don't evaluate the cell numbers for an missing ranges property.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb•de>

Looks good to me, i've tested it and did not see any issues, so here's an:

Acked-by: Laurentiu Tudor <laurentiu.tudor@nxp•com>

---
Thanks & Best Regards, Laurentiu=

      reply	other threads:[~2017-02-28 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 20:42 [PATCH] staging: fsl-mc: fix warning in DT ranges parser Arnd Bergmann
2017-02-28 10:34 ` 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=58B55219.4070509@nxp.com \
    --to=laurentiu.tudor@nxp$(echo .)com \
    --cc=Ramiro.Oliveira@synopsys$(echo .)com \
    --cc=arnd@arndb$(echo .)de \
    --cc=devel@driverdev$(echo .)osuosl.org \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=frowand.list@gmail$(echo .)com \
    --cc=german.rivera@nxp$(echo .)com \
    --cc=gregkh@linuxfoundation$(echo .)org \
    --cc=itai.katz@nxp$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=robh+dt@kernel$(echo .)org \
    --cc=stuyoder@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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