Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933196AbdCGVTU (ORCPT ); Tue, 7 Mar 2017 16:19:20 -0500 Received: from 4.mo2.mail-out.ovh.net ([87.98.172.75]:38030 "EHLO 4.mo2.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933045AbdCGVTR (ORCPT ); Tue, 7 Mar 2017 16:19:17 -0500 X-Greylist: delayed 719 seconds by postgrey-1.27 at vger.kernel.org; Tue, 07 Mar 2017 16:19:17 EST Subject: Re: [PATCH] mtd: spi-nor: intel: use ERR_CAST in return statement To: Boris Brezillon , Nicholas Mc Guire References: <1486973661-1164-1-git-send-email-der.herr@hofr.at> <20170214110909.4338987d@bbrezillon> Cc: David Woodhouse , linux-kernel@vger.kernel.org, Marek Vasut , linux-mtd@lists.infradead.org, Richard Weinberger , Cyrille Pitchen , Brian Norris , Mika Westerberg From: Cyrille Pitchen Message-ID: <73fac7b3-5791-dd23-289b-339b8c6ce0e0@wedev4u.fr> Date: Tue, 7 Mar 2017 22:19:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170214110909.4338987d@bbrezillon> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 2579999636881299281 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeelhedrgedvgdduheduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1932 Lines: 59 Le 14/02/2017 ? 11:09, Boris Brezillon a ?crit : > On Mon, 13 Feb 2017 09:14:21 +0100 > Nicholas Mc Guire wrote: > >> This fixes a sparse warning about incorrect type in retrun expression > > ^return > > and you miss a comma at the end of this sentence. > >> >> Signed-off-by: Nicholas Mc Guire > > You forgot to add my ack (same comment on your other patches). Applied to spi-nor/next with the following changes: - fix typo s/retrun/return/ in commit message. - add missing comma at the end of the sentence. - add Acked-by tag for Boris. Thanks! > >> --- >> >> V2: fixed prefix and the truncated commit message noted by Boris Brezillon >> - thanks! >> >> sparse complained about: >> drivers/mtd/spi-nor/intel-spi.c:731:28: warning: incorrect type in return expression (different address spaces) >> drivers/mtd/spi-nor/intel-spi.c:731:28: expected struct intel_spi * >> drivers/mtd/spi-nor/intel-spi.c:731:28: got void [noderef] *base >> >> Patch was compile tested with: multi_v7_defconfig (implies CONFIG_MTD_SPI_NOR=y) >> >> Patch is against 4.10-rc7 (localversion-next is next-20170213) >> >> drivers/mtd/spi-nor/intel-spi.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/mtd/spi-nor/intel-spi.c b/drivers/mtd/spi-nor/intel-spi.c >> index 2956f2c..1a6de4b 100644 >> --- a/drivers/mtd/spi-nor/intel-spi.c >> +++ b/drivers/mtd/spi-nor/intel-spi.c >> @@ -728,7 +728,7 @@ struct intel_spi *intel_spi_probe(struct device *dev, >> >> ispi->base = devm_ioremap_resource(dev, mem); >> if (IS_ERR(ispi->base)) >> - return ispi->base; >> + return ERR_CAST(ispi->base); >> >> ispi->dev = dev; >> ispi->info = info; > > > ______________________________________________________ > Linux MTD discussion mailing list > http://lists.infradead.org/mailman/listinfo/linux-mtd/ >