From patchwork Tue Jan 26 15:26:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101082 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2027492lbb; Tue, 26 Jan 2016 07:27:07 -0800 (PST) X-Received: by 10.66.237.66 with SMTP id va2mr34926097pac.87.1453822027805; Tue, 26 Jan 2016 07:27:07 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2si2606930pfj.159.2016.01.26.07.27.07; Tue, 26 Jan 2016 07:27:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966063AbcAZP1G (ORCPT + 2 others); Tue, 26 Jan 2016 10:27:06 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:59543 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966058AbcAZP1C (ORCPT ); Tue, 26 Jan 2016 10:27:02 -0500 Received: from wuerfel.localnet ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0MdLIx-1aevyU0UiZ-00IVMP; Tue, 26 Jan 2016 16:26:33 +0100 From: Arnd Bergmann To: Ulf Hansson Cc: linux-arm-kernel@lists.infradead.org, Kishon Vijay Abraham I , Andreas Fenkart , Tony Lindgren , Roger Quadros , linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Ujfalusi Subject: [PATCH v2] mmc: omap_hsmmc: don't print uninitialized variables Date: Tue, 26 Jan 2016 16:26:31 +0100 Message-ID: <3411189.gO0215GrNM@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:1U0PQzN6x5CQqWeysl0CJWdEefxpSIqOuWvVOU8hv+Vl7Gk+XOJ CmBUIBlvwmNmzFvEAnLlXbsGGHDmbdbbCNq3/L80NyXvwWrr4QvnCivty5MBvF2aAEH8+Pu 4ea4hQoFaoASf8wnJ8MFKPg2+eDuY9qJPGbmdw+IOftZ15OWJsaxgEZShMEMnwb6mv04T7v KxRIga9saY4rfg6nejIuw== X-UI-Out-Filterresults: notjunk:1; V01:K0:BLlVpFZ1LSk=:tU68L2/T+DGzgC8qZSpPPA 1NmtQzEpD+zutFs89hVO4cOZRU0jXaMrCXMesBe1bpz3rrP2dK/dCjJF2pRMUIRH6wNR8u1Pi /2j2OEfS0Lk6bvCYxJetQNbTXxhAJalrgkcKA+sdIGCoGo8HEWuKES+xiSizzNAzBjhPaCKPj bpmkQwNpgwf5NFJYRlU5yHQsFnQ/45OlE4DcEms6ietuasuUtJzFjv5HQybpfM020w0FgPzNT SpWLvvXP3IabmBIlMZR0nz8EFUnq+5c2aeCYMNH5ftyo5eQjkPbspFSPQ7CucWgtqz9+aN19L Fl49IqhxPgzKIySpKs9cjNUAGz5oFUZVAb2O0NXBWWcDMR0f/TqrK7Z+ZTTQdiPpDsTTgBOsB g9eu7i08SlRcmoQCa5kMBFppPRvQ9OhhWzFEHVxk5Jm+B2B89GLdzpf/RA3VCR3QNpaPuhOv6 SeIUMmvaSYj3OpuSgnVk7cuwQphEG3D2/WdZz3WncRUPdrj0m5GDih6LnksdxVmzSOI86uqt8 L1Xxty4YGbuUTNUMDmNm099kACcbnN5pN3gpZyNSirYpe/DLs59ywIokeuU3WcCKYDvWx+oJN 3qg0Dalb84Ep8lr7gxdrZpxSVFmXeDNJjrZgF4z1m9HMMsoJ5BRpNyBQowpw+AE3QU96vC/Yl GDUvVu681IJ3Wi7K69E1bui5tqc1zCZDGnsjqEjWs0m29Rniqn+Rh/NKD7nCUby+l+9eAr1YO pfePTIPDdWfrbd93 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org 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 --- A simpler patch as v1 with the same result, as suggested by Peter Ujfalusi. -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Peter Ujfalusi 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; }