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: 8124051 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 753599F6DA for ; Tue, 26 Jan 2016 15:27:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A888520260 for ; Tue, 26 Jan 2016 15:27:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D02312022D for ; Tue, 26 Jan 2016 15:27:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966109AbcAZP1G (ORCPT ); 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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rbd93 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Tony Lindgren Reviewed-by: Peter Ujfalusi --- A simpler patch as v1 with the same result, as suggested by Peter Ujfalusi. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }