From patchwork Fri Aug 4 04:49:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 9880439 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 85A2E60360 for ; Fri, 4 Aug 2017 04:51:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D10A28988 for ; Fri, 4 Aug 2017 04:51:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6119C28995; Fri, 4 Aug 2017 04:51:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DFC3328988 for ; Fri, 4 Aug 2017 04:51:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=ERT3XlY9CCrHtuP4WScBzarGT6dO2Ifr4HN32C6lxjs=; b=a9h Ot6hph6y8y4B3ANzNNAwqNa+QHqIWR7KumEiIce1nH2jwd6dM5iOa2P0f2IQhDTB7D7RhdS6MIT31 7of7sne9E+0Z67o0SDlCR99hK8Ejg6IIITkGxRd5sGtONCCGXLetWlkFFfFzClpXxGuFboIl17elu 7MfiKPM6V62pwFP0afO31hGZ0Sj6UmEKsQ273QmyQqj4vJbuQQk34ZzqRNeiJiIU90smPPg/pvQxz 126Dh97/B00vQBkNRJUqGnSNzVCGi7r2CtSyCpMnqRUE/ybdY95XwUOD1sVbuXib0oTyphttt/0Ud Qf/LwQIl9oY2RQt4e4p/pzrImPrFCKA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ddUZv-0003p1-MF; Fri, 04 Aug 2017 04:51:15 +0000 Received: from conuserg-10.nifty.com ([210.131.2.77]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ddUZs-0003ni-K4 for linux-arm-kernel@lists.infradead.org; Fri, 04 Aug 2017 04:51:14 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id v744noZ5019894; Fri, 4 Aug 2017 13:49:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com v744noZ5019894 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1501822190; bh=uZvGIPZPRQ3aUqq9qv7w1KRFK2daO2+M98DakMTZ7kM=; h=From:To:Cc:Subject:Date:From; b=MBaRE8shdc3KzfmC7HQDh296kZTbTW4NJzqUk+MixJ8esTH7MvL1aWwjUGyckQKcZ gLx5X8YSF47PwatdrRzqzibLasbUtEJe+ycFz3WGt20AIVWuN4OY2ts9+9iB+RX6Fw nCEK0LYgYGv+FJsMQQZaU3HQh1fJcG1c+AFztV4hrAX3vLbqgs7ZnaO835NAz0nr6M EDX5MGNue/w2EWmfOeRa/R6nefMeoduNhM4q3a9NRGi2RrMuQZqfWqws9MTMCTfgih HgYoelnOFV0nqztyNhEaJV5GWzCz+byQSed7vrS0ZqIroK44in6FNLlk5ABxFGFhnD fGdAiE2rPk5vA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-gpio@vger.kernel.org Subject: [PATCH] pinctrl: nomadik: fix incorrect type in return expression Date: Fri, 4 Aug 2017 13:49:47 +0900 Message-Id: <1501822187-25303-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170803_215112_965247_83A7A785 X-CRM114-Status: UNSURE ( 7.19 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Masahiro Yamada , Linus Walleij , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Alessandro Rubini MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Sparse reports "warning: incorrect type in return expression (different address spaces)" because nmk_gpio_populate_chip() is supposed to return (struct nmk_gpio_chip *) whereas devm_ioremap_resource() returns (void __iomem *). ERR_CAST() is needed to fix the warning. Signed-off-by: Masahiro Yamada --- drivers/pinctrl/nomadik/pinctrl-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c index d318ca055489..a53f1a9b1ed2 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c @@ -1078,7 +1078,7 @@ static struct nmk_gpio_chip *nmk_gpio_populate_chip(struct device_node *np, res = platform_get_resource(gpio_pdev, IORESOURCE_MEM, 0); base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(base)) - return base; + return ERR_CAST(base); nmk_chip->addr = base; clk = clk_get(&gpio_pdev->dev, NULL);