From patchwork Wed Aug 8 02:52:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Ball X-Patchwork-Id: 1292121 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 59ED83FC23 for ; Wed, 8 Aug 2012 02:52:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755813Ab2HHCww (ORCPT ); Tue, 7 Aug 2012 22:52:52 -0400 Received: from void.printf.net ([89.145.121.20]:36834 "EHLO void.printf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755426Ab2HHCwv (ORCPT ); Tue, 7 Aug 2012 22:52:51 -0400 Received: from c-76-24-28-220.hsd1.ma.comcast.net ([76.24.28.220] helo=octavius.laptop.org) by void.printf.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1SywOA-0003i0-4m; Wed, 08 Aug 2012 03:52:50 +0100 From: Chris Ball To: Shubhrajyoti D Cc: , , Kevin Hilman Subject: Re: [PATCH RFC] mmc: omap_hsmmc: Fix the warning References: <1343119640-24516-1-git-send-email-shubhrajyoti@ti.com> Date: Tue, 07 Aug 2012 22:52:47 -0400 In-Reply-To: <1343119640-24516-1-git-send-email-shubhrajyoti@ti.com> (Shubhrajyoti D.'s message of "Tue, 24 Jul 2012 14:17:20 +0530") Message-ID: <87pq72xfgg.fsf@octavius.laptop.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Hi, On Tue, Jul 24 2012, Shubhrajyoti D wrote: > The commit 9c17d08 [mmc: omap_hsmmc: ensure probe returns error upon > resource failure] introduced the below warning. > > CC drivers/of/of_net.o > drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_probe': > drivers/mmc/host/omap_hsmmc.c:1936: warning: statement with no effect > > Fix the same by assigning the error value to ret. > > Cc: Kevin Hilman > Reported-by: Archit Taneja > Signed-off-by: Shubhrajyoti D > --- > drivers/mmc/host/omap_hsmmc.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c > index be8631d..3a09f93 100644 > --- a/drivers/mmc/host/omap_hsmmc.c > +++ b/drivers/mmc/host/omap_hsmmc.c > @@ -1933,7 +1933,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) > host->tx_chan = dma_request_channel(mask, omap_dma_filter_fn, &tx_req); > if (!host->tx_chan) { > dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel %u\n", tx_req); > - ret -ENXIO; > + ret = -ENXIO; > goto err_irq; > } I think you must be confused -- this warning isn't present in mainline, and the line in commit 9c17d08 is already correct: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=9c17d08ca183b92c9cfab6537069914a5e0e7e81 diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index a9227a7..bc28627 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1931,6 +1931,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); if (!res) { dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n"); + ret = -ENXIO; goto err_irq; } host->dma_line_tx = res->start; @@ -1938,6 +1939,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); if (!res) { dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n"); + ret = -ENXIO; goto err_irq; } host->dma_line_rx = res->start;