From patchwork Tue May 11 09:29:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 434184 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp3648987jao; Tue, 11 May 2021 02:29:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0vRHiqysAlRdkQEeTRY+94aLEZiP7Fg3qGfzAohRhJso2XNlry0UQeIuN3CyzewFCUEWb X-Received: by 2002:a17:90a:8911:: with SMTP id u17mr32808457pjn.165.1620725381944; Tue, 11 May 2021 02:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620725381; cv=none; d=google.com; s=arc-20160816; b=pZQzrUqZy8A9R69k6a0d+lMP5BklsC8v5KXabIH032i7LVShRohLlOV0FSnNy3GSQM pHyg3wP2USPlKn7ElB44RsIBuGONppi9+UsLVnu+oE5MUq+vhEeeuaXEr3tEN6vdqagj x89I6wqxB+I/LFauPyRG/GZMcV3XQR1cxgSK6+QgdHxasm6SF19+SoVfmy5Rcrkue3w9 YUit6mRE4CqpJ3x2Ryox4KksSJVMA22B1t43bUoKo9sLzbVoSt7EMGqDaCS38QplFwA3 /5yvUpmqJyCHvsQeGZdnMXk7rt0LgD5xnx9SXWJ0qUzqfB1cRL+AZLx6MgDvw+Qh33Uv ZnGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:delivered-to; bh=p869XBk8eX1tVP0+LhqIjKzSOUNhx2Ek4AFINVwmS8U=; b=OadcBYpO6YxaKkWmpxqwTBfRE5k3afWsb3L1Qroucxtq96St6d0xhD+YngYd1OkzFW bRrYn5lDdodvO+FMsSZFbKrIYo3lHqRBQuugfvfs6K09hXB5BjnUBttDBcJL5Gaxg5B5 74dpHlTNx3gmZszCatk7TurloXRM3R6UCagAVANlwk2UxnX8qrkcvCy5h6QkSyqsqdHm yOZsjOkIiwDgo99eep2ZuMEks681amqmGRsdIolfXs0nDIsuYkzkxfg9gD40EG4pTUB4 BFG9pRcuq5wClSXaI3ohOZ/KM0BQ4pgZgt/55Nns3QneTUtqEFcAPWm5WA+MjDQPotyK f9Jg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id o17si20885092plc.319.2021.05.11.02.29.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 02:29:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA1066E07D; Tue, 11 May 2021 09:29:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) by gabe.freedesktop.org (Postfix) with ESMTPS id 66C3D6E07D for ; Tue, 11 May 2021 09:29:38 +0000 (UTC) Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FfXcZ4VcJzCqtd; Tue, 11 May 2021 17:26:54 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Tue, 11 May 2021 17:29:27 +0800 From: Zhen Lei To: Eric Anholt , Maxime Ripard , "David Airlie" , Daniel Vetter , dri-devel Subject: [PATCH 1/1] drm/vc4: Remove redundant error printing in vc4_ioremap_regs() Date: Tue, 11 May 2021 17:29:23 +0800 Message-ID: <20210511092923.4617-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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhen Lei Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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/gpu/drm/vc4/vc4_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.26.0.106.g9fadedd diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 556ad0f02a0db56..46091f3b4857c93 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -56,10 +56,8 @@ void __iomem *vc4_ioremap_regs(struct platform_device *dev, int index) res = platform_get_resource(dev, IORESOURCE_MEM, index); map = devm_ioremap_resource(&dev->dev, res); - if (IS_ERR(map)) { - DRM_ERROR("Failed to map registers: %ld\n", PTR_ERR(map)); + if (IS_ERR(map)) return map; - } return map; }