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: 109368 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp1675199qge; Thu, 3 Aug 2017 21:51:17 -0700 (PDT) X-Received: by 10.99.170.1 with SMTP id e1mr974774pgf.411.1501822277159; Thu, 03 Aug 2017 21:51:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501822277; cv=none; d=google.com; s=arc-20160816; b=U41t8ZJuJEyyPFDCW64lsac6buffhZTVHhYFsm+Egp3VxGRkqZ4l8naOcBRYPHDs+2 SZfvzrA16vSAYBhe2JC5q16CNQFmWe3XMYFPWPMQqy6WAWrQxcU5v1eXdv1fVHpD5aav 4heInWq2NZQyW6OD15pv02S/Zfx8b3/CkxNOupeGk3fipyo77JgfgGgGv6M3MS4l/N/l GG9IJCFHPnkvNjB4tsmPSkGbkOLq9TkWw0pcJDNzZynvkXj+SBpgpufVKRIXgd/oJqbH HXgm5dltSXjShdtytwRSx9TKk5MDRyTnXJWhdtqc4hAVotWECM1ZfWyr1MHhFbyxa4KP 1kYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=JNF0/XBrMNRHeVnOmnU2qE2Can/3ZngV222Nwb4J70Y=; b=yCOTgpXfrFO44XJ7IT6ycM2CvahW/SX8gkP3mLsmbTsTaLu2Ptd8h3TZghSVIO7g7N GNQCNZ1ZGvxRheyvflg2j4a0M/+y81wCCvxg60PYHpVlRpIg0MEd9g9G91dpsYmzfeMQ SkhTx+Znni/ZcONjekWit6U+KsO4sztuXJ2H4702S8gUg99TBeWu30P8zDUJaV9ZGOrn MPOGZZYhy2fBA17riuTXMBiRmWe/MRuNwy0mzlWr1yNLo+BwI6QjMTfq7Pc1v1meEUnl +zo/4i6BQz8NFPrbm23LcxqtboSDt47UL5H9uj0bp+JRj9KKN9I1j7DSJPZopJZqVqQb OpFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=MBaRE8sh; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z96si514358plh.175.2017.08.03.21.51.16; Thu, 03 Aug 2017 21:51:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=MBaRE8sh; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751265AbdHDEvQ (ORCPT + 4 others); Fri, 4 Aug 2017 00:51:16 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:21707 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899AbdHDEvP (ORCPT ); Fri, 4 Aug 2017 00:51:15 -0400 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 Cc: Masahiro Yamada , Linus Walleij , linux-arm-kernel@lists.infradead.org, Alessandro Rubini , linux-kernel@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 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" 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/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);