From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F6DAC433ED for ; Tue, 11 May 2021 08:51:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6CEE061106 for ; Tue, 11 May 2021 08:51:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231176AbhEKIws (ORCPT ); Tue, 11 May 2021 04:52:48 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:2619 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230518AbhEKIws (ORCPT ); Tue, 11 May 2021 04:52:48 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FfWm25wHQzPwZY; Tue, 11 May 2021 16:48:18 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Tue, 11 May 2021 16:51:32 +0800 From: Zhen Lei To: Linus Walleij , Ray Jui , Scott Branden , bcm-kernel-feedback-list , linux-gpio , linux-arm-kernel CC: Zhen Lei Subject: [PATCH 1/1] pinctrl: iproc-gpio: Remove redundant error printing in iproc_gpio_probe() Date: Tue, 11 May 2021 16:51:26 +0800 Message-ID: <20210511085126.4287-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c index e2bd2dce6bb4154..dc511b9a6b43f1b 100644 --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c @@ -813,10 +813,8 @@ static int iproc_gpio_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 1); if (res) { chip->io_ctrl = devm_ioremap_resource(dev, res); - if (IS_ERR(chip->io_ctrl)) { - dev_err(dev, "unable to map I/O memory\n"); + if (IS_ERR(chip->io_ctrl)) return PTR_ERR(chip->io_ctrl); - } if (of_device_is_compatible(dev->of_node, "brcm,cygnus-ccm-gpio")) io_ctrl_type = IOCTRL_TYPE_CDRU; -- 2.26.0.106.g9fadedd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24B69C433B4 for ; Tue, 11 May 2021 12:24:25 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7959E6134F for ; Tue, 11 May 2021 12:24:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7959E6134F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC: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=JgARl3eNSvTzrCeXb0HH+0hXHoK0wIHTEUU4hFqkpJI=; b=bbJA7Uvq9aAB5mfimp3YIftJjU 50YV3tV0jsGGFDbJXZITcT4dYUnHPZ/c2PmmB2vgI+AM+pa9i8nh7aeujmj7o/GZQGuS7RHy0IVy8 Uhb+sU3W5iMJI7nibbMHVxqeQN5ezXdK5xw5NQHhsQSjrqg0elnesmadU0AXjuqFshUHZdJEDDICj Vdy3zaC+cOO2xUBLfyoM9aEj/u//Gci56A+a/M9BrjXB1tfrp8nuAicwYuV/YQVNhHrt0AxsFl7iQ adEh0FKnLdAopGekDYnXBMGPuDgKvzpxzF1DsxfEHzxj3j6f4GwanbPcAthTNiyKbn14zdpJWhJrr e0rcDuyg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgRPu-00HMUg-1Q; Tue, 11 May 2021 12:23:14 +0000 Received: from [2607:7c80:54:e::133] (helo=bombadil.infradead.org) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgO7M-00GdRz-HA for linux-arm-kernel@desiato.infradead.org; Tue, 11 May 2021 08:51:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description:In-Reply-To:References; bh=zAxXpOXKnLKHZTuVaEqIHq9p1njZ/92dhaj0pB9I9rM=; b=BFz1HqhfXbkal6xGhMjNsBJ404 iud/CrdLwl45/iVkYjaGmpjx0iEXM2DjuF4x7NkG8lRz3RbFK+HC0ssGBA85ye1at5pDxklaBRObB 5hIdRupELBxzlVQ8zpYMycrx1kfduK+WygFHVTKL4t9eePcsiHDIUgcUMGM0Rfkgg3aK5WFaJLojN 2VS/EKjGj57p6J3Be8WY5QMX2qSAT/SB7iVCJDl1Xn+jEaaXuv3fE/+5h2yBoU7ZJwcx5t1tO1+E4 lDf1pw+0EMEB/am6kkKiRquPn9a9tZg1bZs4aNnKy0m7k61by3A7ztKeD8BEcBlH8dieYn2YBDjN/ 1Y+x64uw==; Received: from szxga05-in.huawei.com ([45.249.212.191]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgO7J-009PXS-Np for linux-arm-kernel@lists.infradead.org; Tue, 11 May 2021 08:51:51 +0000 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FfWm25wHQzPwZY; Tue, 11 May 2021 16:48:18 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Tue, 11 May 2021 16:51:32 +0800 From: Zhen Lei To: Linus Walleij , Ray Jui , Scott Branden , bcm-kernel-feedback-list , linux-gpio , linux-arm-kernel CC: Zhen Lei Subject: [PATCH 1/1] pinctrl: iproc-gpio: Remove redundant error printing in iproc_gpio_probe() Date: Tue, 11 May 2021 16:51:26 +0800 Message-ID: <20210511085126.4287-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_015149_959858_E3AD98E1 X-CRM114-Status: GOOD ( 10.68 ) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_015149_959858_E3AD98E1 X-CRM114-Status: UNSURE ( 6.82 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c index e2bd2dce6bb4154..dc511b9a6b43f1b 100644 --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c @@ -813,10 +813,8 @@ static int iproc_gpio_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 1); if (res) { chip->io_ctrl = devm_ioremap_resource(dev, res); - if (IS_ERR(chip->io_ctrl)) { - dev_err(dev, "unable to map I/O memory\n"); + if (IS_ERR(chip->io_ctrl)) return PTR_ERR(chip->io_ctrl); - } if (of_device_is_compatible(dev->of_node, "brcm,cygnus-ccm-gpio")) io_ctrl_type = IOCTRL_TYPE_CDRU; -- 2.26.0.106.g9fadedd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel