From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Arnd Bergmann <arnd@arndb.de>, Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
Kishon Vijay Abraham I <kishon@ti.com>,
Andreas Fenkart <afenkart@gmail.com>,
Tony Lindgren <tony@atomide.com>, Roger Quadros <rogerq@ti.com>,
linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mmc: omap_hsmmc: don't print uninitialized variables
Date: Wed, 27 Jan 2016 10:14:44 +0200 [thread overview]
Message-ID: <56A87C74.2010905@ti.com> (raw)
In-Reply-To: <3411189.gO0215GrNM@wuerfel>
On 01/26/2016 05:26 PM, Arnd Bergmann wrote:
> When DT based probing is used but the DMA request fails, the
> driver will print uninitialized stack data from the rx_req
> and tx_req variables, as indicated by this warning:
>
> drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_probe':
> drivers/mmc/host/omap_hsmmc.c:2162:3: warning: 'rx_req' may be used uninitialized in this function [-Wmaybe-uninitialized]
> dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req);
>
> This removes the DMA request line number from the warning, which
> is the easiest solution and won't hurt us any more as we are
> planning to remove the legacy code path anyway.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> A simpler patch as v1 with the same result, as suggested by Peter Ujfalusi.
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index b6639ea0bf18..87f0d840a166 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2159,7 +2159,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> &rx_req, &pdev->dev, "rx");
>
> if (!host->rx_chan) {
> - dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req);
> + dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel\n");
> ret = -ENXIO;
> goto err_irq;
> }
> @@ -2169,7 +2169,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> &tx_req, &pdev->dev, "tx");
>
> if (!host->tx_chan) {
> - dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel %u\n", tx_req);
> + dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel\n");
> ret = -ENXIO;
> goto err_irq;
> }
>
--
Péter
WARNING: multiple messages have this Message-ID (diff)
From: peter.ujfalusi@ti.com (Peter Ujfalusi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] mmc: omap_hsmmc: don't print uninitialized variables
Date: Wed, 27 Jan 2016 10:14:44 +0200 [thread overview]
Message-ID: <56A87C74.2010905@ti.com> (raw)
In-Reply-To: <3411189.gO0215GrNM@wuerfel>
On 01/26/2016 05:26 PM, Arnd Bergmann wrote:
> When DT based probing is used but the DMA request fails, the
> driver will print uninitialized stack data from the rx_req
> and tx_req variables, as indicated by this warning:
>
> drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_probe':
> drivers/mmc/host/omap_hsmmc.c:2162:3: warning: 'rx_req' may be used uninitialized in this function [-Wmaybe-uninitialized]
> dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req);
>
> This removes the DMA request line number from the warning, which
> is the easiest solution and won't hurt us any more as we are
> planning to remove the legacy code path anyway.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> A simpler patch as v1 with the same result, as suggested by Peter Ujfalusi.
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index b6639ea0bf18..87f0d840a166 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2159,7 +2159,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> &rx_req, &pdev->dev, "rx");
>
> if (!host->rx_chan) {
> - dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req);
> + dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel\n");
> ret = -ENXIO;
> goto err_irq;
> }
> @@ -2169,7 +2169,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> &tx_req, &pdev->dev, "tx");
>
> if (!host->tx_chan) {
> - dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel %u\n", tx_req);
> + dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel\n");
> ret = -ENXIO;
> goto err_irq;
> }
>
--
P?ter
WARNING: multiple messages have this Message-ID (diff)
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Arnd Bergmann <arnd@arndb.de>, Ulf Hansson <ulf.hansson@linaro.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
Kishon Vijay Abraham I <kishon@ti.com>,
Andreas Fenkart <afenkart@gmail.com>,
Tony Lindgren <tony@atomide.com>, Roger Quadros <rogerq@ti.com>,
<linux-mmc@vger.kernel.org>, <linux-omap@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] mmc: omap_hsmmc: don't print uninitialized variables
Date: Wed, 27 Jan 2016 10:14:44 +0200 [thread overview]
Message-ID: <56A87C74.2010905@ti.com> (raw)
In-Reply-To: <3411189.gO0215GrNM@wuerfel>
On 01/26/2016 05:26 PM, Arnd Bergmann wrote:
> When DT based probing is used but the DMA request fails, the
> driver will print uninitialized stack data from the rx_req
> and tx_req variables, as indicated by this warning:
>
> drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_probe':
> drivers/mmc/host/omap_hsmmc.c:2162:3: warning: 'rx_req' may be used uninitialized in this function [-Wmaybe-uninitialized]
> dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req);
>
> This removes the DMA request line number from the warning, which
> is the easiest solution and won't hurt us any more as we are
> planning to remove the legacy code path anyway.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> A simpler patch as v1 with the same result, as suggested by Peter Ujfalusi.
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index b6639ea0bf18..87f0d840a166 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2159,7 +2159,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> &rx_req, &pdev->dev, "rx");
>
> if (!host->rx_chan) {
> - dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req);
> + dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel\n");
> ret = -ENXIO;
> goto err_irq;
> }
> @@ -2169,7 +2169,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
> &tx_req, &pdev->dev, "tx");
>
> if (!host->tx_chan) {
> - dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel %u\n", tx_req);
> + dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel\n");
> ret = -ENXIO;
> goto err_irq;
> }
>
--
Péter
next prev parent reply other threads:[~2016-01-27 8:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 15:26 [PATCH v2] mmc: omap_hsmmc: don't print uninitialized variables Arnd Bergmann
2016-01-26 15:26 ` Arnd Bergmann
2016-01-26 19:37 ` Tony Lindgren
2016-01-26 19:37 ` Tony Lindgren
2016-01-27 8:14 ` Peter Ujfalusi [this message]
2016-01-27 8:14 ` Peter Ujfalusi
2016-01-27 8:14 ` Peter Ujfalusi
2016-01-29 11:40 ` Ulf Hansson
2016-01-29 11:40 ` Ulf Hansson
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=56A87C74.2010905@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=afenkart@gmail.com \
--cc=arnd@arndb.de \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=rogerq@ti.com \
--cc=tony@atomide.com \
--cc=ulf.hansson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.