Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp349183imw; Thu, 14 Jul 2022 02:27:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vnQo0HcXHhWaqdcZQHIdfE/eSSxXCR6QbcZ7CVQI+8YZ07cgRyJRRShsMxJFsKrZr4ugcz X-Received: by 2002:a17:907:8688:b0:72b:39d0:a715 with SMTP id qa8-20020a170907868800b0072b39d0a715mr7992156ejc.74.1657790862342; Thu, 14 Jul 2022 02:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657790862; cv=none; d=google.com; s=arc-20160816; b=Cn43GibO+BvEi2D3GH4sq+rWaAetMaiUwfVVlERpw0T2qlpgbvmPPggYzldYTRANX1 P0Wq0Car1QJwO/8mvxshmYxzBTEu5PYZgSx9fDkyQZiELaSdUctmaTudswU/o1zBcZ4V j+odVKtyu6/xExGHhO2cvBzBV79AF6pspVsLPzO1PXGo5uj4VXycikZXoIrWqRfA9bM3 KvyVRFny9V7EUIjgW6DOaL9bVW2OseA+ZBb/PPbDXeR7utylkc2wIhmUxAqIB1Vn7vaK mvt2RDiIQg2kqu62/+389t4JfmyiiogxVGohxxwxmqLzC+DQgMNu4ixD5jCL5Qxb1p72 tS+Q== 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=alyDnUVbJtJDkzBt8AVWjOHlvSxtdXVnMAvNEDJB1H4=; b=VPBhQvNB/ov/KkG/y7SqpprLkfxJCC1lTnisDxiF9BAlbHZh0H8dZXFHAQCHLhDoiX mPm74yAiHl525yaUhrkULvIwv9kQ2l6+IE/3xem7WGvdyrFQeDEJxZFDU4r6VFTZxiP4 UkqwX2oA/c8GkEu0uyVpfssNnccDYfuM0kryAaPCuTKY5iATsY+416ODg/AEw4UaJO2v RdqCFJG4rkL7x4FPtf9WSs3BaVNareyYEzcBTW4xW+W6BReXS7DN1YZzXnGPgXIdqZe/ CIF7O8TQ9cfLSNfbogLOGKINlOG2OJ281G9Bla1LJKnYIVRvl/+33VN5qoOqbeg4mVdQ EFzA== 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 d21-20020a17090694d500b00726e16c2d4fsi1172949ejy.178.2022.07.14.02.27.17; Thu, 14 Jul 2022 02:27:42 -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 S236411AbiGNImR (ORCPT + 99 others); Thu, 14 Jul 2022 04:42:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236564AbiGNImM (ORCPT ); Thu, 14 Jul 2022 04:42:12 -0400 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD19D3D5A7; Thu, 14 Jul 2022 01:42:03 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R341e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VJIOffY_1657788120; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VJIOffY_1657788120) by smtp.aliyun-inc.com; Thu, 14 Jul 2022 16:42:01 +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] soc/tegra: cbb: Remove unnecessary print function dev_err() Date: Thu, 14 Jul 2022 16:41:58 +0800 Message-Id: <20220714084158.33521-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, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,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 platform_get_irq()<--platform_get_irq_optional() platform_get_irq_optional() return non-zero IRQ number on success, negative error number on failure, if IRQ number is 0, return -EINVAL. so the function platform_get_irq() never returns 0, and the print function dev_err() is redundant because platform_get_irq() already prints an error. Eliminate the follow coccicheck warnings: ./drivers/soc/tegra/cbb/tegra-cbb.c:142:3-10: line 142 is redundant because platform_get_irq() already prints an error ./drivers/soc/tegra/cbb/tegra-cbb.c:152:2-9: line 152 is redundant because platform_get_irq() already prints an error Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/soc/tegra/cbb/tegra-cbb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/soc/tegra/cbb/tegra-cbb.c b/drivers/soc/tegra/cbb/tegra-cbb.c index d200937353c7..aa9fcbd5d4a7 100644 --- a/drivers/soc/tegra/cbb/tegra-cbb.c +++ b/drivers/soc/tegra/cbb/tegra-cbb.c @@ -138,20 +138,16 @@ int tegra_cbb_get_irq(struct platform_device *pdev, unsigned int *nonsec_irq, if (num_intr == 2) { irq = platform_get_irq(pdev, index); - if (irq <= 0) { - dev_err(&pdev->dev, "failed to get non-secure IRQ: %d\n", irq); + if (irq < 0) return -ENOENT; - } *nonsec_irq = irq; index++; } irq = platform_get_irq(pdev, index); - if (irq <= 0) { - dev_err(&pdev->dev, "failed to get secure IRQ: %d\n", irq); + if (irq < 0) return -ENOENT; - } *sec_irq = irq; -- 2.20.1.7.g153144c