Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp196137rwi; Tue, 25 Oct 2022 22:58:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6wFzLzi4HGr4PzhfhLi1Ses5eO9AaPwOO+FaA4+EwpLcWR3Y7ztr/vh+bzJAkmBZnHhy31 X-Received: by 2002:a62:a512:0:b0:536:e2bd:e15e with SMTP id v18-20020a62a512000000b00536e2bde15emr43275085pfm.1.1666763911478; Tue, 25 Oct 2022 22:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666763911; cv=none; d=google.com; s=arc-20160816; b=jtWnTfv9tH7XBPfbOQcssyZLEGB56KSAhWtAaEU7O+AJzlSyYIZPK3NojXAp7GmV2/ FdVBvpT2hLqeJcyhE4dvRw/A0cF3Oo71Uyyiiv3jUVvGytpzzRzqKs+QEsO/C9HcsUPZ DDmD7+yiO1EtDx4Mo9y5jD7WwhScuXbxIzGRn/gs4vpt7YbTvcgeyNBx1nMmlT1egT38 k0AfgV2X2A579tUoJbDRpKTgHQnS59/wMsnvdaHyU4fLuNz4rh4eS/tVadHFCrt24pdk pOwkNmFVweg35raD+6Vu8mnSca3xbotVzakd6/1WT9PvVOYGrn01CWnFAluGUDBB0RMX ng9g== 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=Rj3AEDg/Gc8r04vIktbN/0i1gFe/1eOIplicYIR0Srw=; b=KnfnMtlhdJS3oB8iGhG7He7M8V8TYw6KlcJc4n41XOdVUPgEy7WQ2ipUFTz6SpnHqH BaEIucPaCH2gmwrYA2PAogJBVy16LC+hLJBDbkWIyNQLOw+oWZUheMEDDg/nd/95i12U eiucJZGf7fkwd3qoKx6mOwAVACvLUH2Ia2nb/8EJLAuroiF2LdqMl1Ti+x6HMUxCiXgz zXsgmaT12yCWyDGDVw4trSaUFJECkyn6be5gRHHyT3YCDP6rcHoyq4u9gVQvdz3Kqw8X t8S9miM5lkpWb3H2h5fhlVCJ9cqDfpkiy+iklM502fvJEjKCqlKL5CJXdjtqYFgXPiPC 5zVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t12-20020a17090a4e4c00b0020d8df0ac89si1265802pjl.122.2022.10.25.22.58.20; Tue, 25 Oct 2022 22:58:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231341AbiJZFen (ORCPT + 99 others); Wed, 26 Oct 2022 01:34:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232866AbiJZFek (ORCPT ); Wed, 26 Oct 2022 01:34:40 -0400 Received: from out30-44.freemail.mail.aliyun.com (out30-44.freemail.mail.aliyun.com [115.124.30.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E797511178; Tue, 25 Oct 2022 22:34:37 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VT5r56a_1666762474; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VT5r56a_1666762474) by smtp.aliyun-inc.com; Wed, 26 Oct 2022 13:34:35 +0800 From: Yang Li To: thierry.reding@gmail.com Cc: jonathanh@nvidia.com, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] firmware: tegra: Remove surplus dev_err() when using platform_get_irq_byname() Date: Wed, 26 Oct 2022 13:34:33 +0800 Message-Id: <20221026053433.58529-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. ./drivers/firmware/tegra/bpmp-tegra210.c:204:2-9: line 204 is redundant because platform_get_irq() already prints an error ./drivers/firmware/tegra/bpmp-tegra210.c:216:2-9: line 216 is redundant because platform_get_irq() already prints an error Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2579 Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/firmware/tegra/bpmp-tegra210.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/tegra/bpmp-tegra210.c b/drivers/firmware/tegra/bpmp-tegra210.c index 6421e11954f6..6295f5640c15 100644 --- a/drivers/firmware/tegra/bpmp-tegra210.c +++ b/drivers/firmware/tegra/bpmp-tegra210.c @@ -200,10 +200,8 @@ static int tegra210_bpmp_init(struct tegra_bpmp *bpmp) } err = platform_get_irq_byname(pdev, "tx"); - if (err < 0) { - dev_err(&pdev->dev, "failed to get TX IRQ: %d\n", err); + if (err < 0) return err; - } priv->tx_irq_data = irq_get_irq_data(err); if (!priv->tx_irq_data) { @@ -212,10 +210,8 @@ static int tegra210_bpmp_init(struct tegra_bpmp *bpmp) } err = platform_get_irq_byname(pdev, "rx"); - if (err < 0) { - dev_err(&pdev->dev, "failed to get rx IRQ: %d\n", err); + if (err < 0) return err; - } err = devm_request_irq(&pdev->dev, err, rx_irq, IRQF_NO_SUSPEND, dev_name(&pdev->dev), bpmp); -- 2.20.1.7.g153144c