From patchwork Tue May 11 10:06:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 434191 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp3672093jao; Tue, 11 May 2021 03:07:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxA9tEyQFHZFfgIS4yV4C8pf6aSaERVY1zsbVpNIiGKu3RH6fbiXJEDa0VzWyt+yW9A8KG X-Received: by 2002:aa7:dd96:: with SMTP id g22mr35923139edv.222.1620727621490; Tue, 11 May 2021 03:07:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620727621; cv=none; d=google.com; s=arc-20160816; b=T5+m63N2fDQlY7TpMMq9OCQwYTWOBq+o5xdw6HikfsDO/iTfiVoBaBsid5vrW7LY0x eLRz3vIjTdDG1TAWDLh1bn9lZ2HyDx/WMSSDc0M1pyTn+kWVVW3W2bxmDhN/vf9N+d6O 6FtF2+6RXXY/t4iJgMso/v55yjMPtomgwMEJ7CL0Sb3o2D2dHOT9Q57r7VpHOELIU0MQ ztIkEFCduAonJIgMgOMNAGevY0fpl4+bMuSjWfjThHqG/xIBQrv6FpVNj1JIuEhRO8Kc T8EC3v2piXzS24ikDPDWwXSxi+z4hco/NX1GP/f4x5bD/w2dDOKMFXW5F0ppuP4aVqRL QQUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=mcCiFAycviXveNTJ4uTujAPQPWemU3b+Qu+pgfcAFVQ=; b=qXpF38T7Mtv0zA0Obpl692O73a/hNtWiffN/b033mCMzwzQawwsKJetVqsxmkjRJEh 7t+wLChOCYrbZndfl+SKqBYCMosxOsDR7/X8JtOaK0JI8R5OZ/N4KwgfEOTYwBtHQE5l YejGTKvvjGrlp8LLNNiXwsKPn8vgYmocuWgeNATwc2n/7vHFDek1WDmsZe0okoOVEHGp J/KmJGT8MOeUZL4lPS4xRzYHCN76C+chOQ+O/MwJcAElkZn9eYuQAPxZm+n5f6jVN/h/ CxQoL9ccum28PjI8h1lxSK6886Z4Mq62kdysCHniuLPJfraLoEfrpm00GwriB2cTlFoa 8OWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c7si15901984edv.323.2021.05.11.03.07.01; Tue, 11 May 2021 03:07:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231204AbhEKKIG (ORCPT + 3 others); Tue, 11 May 2021 06:08:06 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2775 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231468AbhEKKIG (ORCPT ); Tue, 11 May 2021 06:08:06 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FfYQx53Gszmfn6; Tue, 11 May 2021 18:03:37 +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 18:06:52 +0800 From: Zhen Lei To: Linus Walleij , Bartosz Golaszewski , linux-gpio CC: Zhen Lei Subject: [PATCH 1/1] gpio: logicvc: Remove redundant error printing in logicvc_gpio_probe() Date: Tue, 11 May 2021 18:06:46 +0800 Message-ID: <20210511100646.5156-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 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/gpio/gpio-logicvc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.26.0.106.g9fadedd diff --git a/drivers/gpio/gpio-logicvc.c b/drivers/gpio/gpio-logicvc.c index 015632cf159f0b8..992cc958a43fd1e 100644 --- a/drivers/gpio/gpio-logicvc.c +++ b/drivers/gpio/gpio-logicvc.c @@ -114,10 +114,8 @@ static int logicvc_gpio_probe(struct platform_device *pdev) } base = devm_ioremap_resource(dev, &res); - if (IS_ERR(base)) { - dev_err(dev, "Failed to map I/O base\n"); + if (IS_ERR(base)) return PTR_ERR(base); - } logicvc_gpio_regmap_config.max_register = resource_size(&res) - logicvc_gpio_regmap_config.reg_stride;