Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6378851pxb; Tue, 15 Feb 2022 00:48:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuRPD5Qk1jfb4Ao2VbnxfIf6reKSk31TC2UpaDlUezlWWguMeiwQfKcSM22heKcXmuPPQ7 X-Received: by 2002:a17:90a:12c8:: with SMTP id b8mr3139673pjg.168.1644914925428; Tue, 15 Feb 2022 00:48:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644914925; cv=none; d=google.com; s=arc-20160816; b=eNkI7dcwRPTRJ//s3CCY3kackAok3pREHKJTlZ5GWUVAIOq8Oemgql6fRb2CUutrQn eHhtvy9f/eAo3eeFEyRwMvNjnWteJwsIRTYf12grPqyC15BS/KEOtOBsYlaIAuZNgx32 TTu8OQop+X9GrTceGw4V8kSXxf63dgYtzT93dm7dKdTkAc2joHQFskBCmD65Ixt+9ikc JmHflWvXsZfo46cQ31vd6C5aywL1lf11qJoU1AdvCKY4d5K/j7DcuGRECUWRMQnb8fft 5xLuP0YYluScbzPlaP9K2JXO7/FgLKIyC35NEN4g74jPbV/viist60kKQLBksWKIhcfU kR4Q== 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=IE5D55JJOPD8izxlDLbDu2MvWYJL3ZJ0Vtxw1YIZri8=; b=APROs43DlXJowWG6AfrN7V73mHUoQjwCfG/pMlnX9xk9p5/1AIhnk7CeZL2W+nLHFV bcX48bygG88v1s3mJNr7RdzYVRh3+GOobdAllOgYWvPBtB9t7frmwPsiPskLctmWQn48 XLl1pXecF0AGwdxcIAiUsrFFlr7QdX0njndmxoBo80sBK8QQ+sLUHI/jcmGIkNQLa7AP CdcS9k1eAUHtMR/DplhFJVUQQdsuxj6LL4Kl+fnHwCDG9kYlsSiQ5dRyx6g53LWFRNgl +aQq/zQkfoUmKJKpskJpbhSHvW/a1rsD4fqKOYlZine4G2c68GN0mBCr+plV9fWYtG5q FI1Q== 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 na14si5619845pjb.16.2022.02.15.00.48.31; Tue, 15 Feb 2022 00:48:45 -0800 (PST) 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 S233309AbiBOCFj (ORCPT + 99 others); Mon, 14 Feb 2022 21:05:39 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:49356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231868AbiBOCFi (ORCPT ); Mon, 14 Feb 2022 21:05:38 -0500 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 C7E511EC75; Mon, 14 Feb 2022 18:05:28 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R261e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0V4WCuSn_1644890725; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0V4WCuSn_1644890725) by smtp.aliyun-inc.com(127.0.0.1); Tue, 15 Feb 2022 10:05:26 +0800 From: Yang Li To: jejb@linux.ibm.com Cc: martin.petersen@oracle.com, john.garry@huawei.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] scsi: hisi_sas: Remove unnecessary print function dev_err() Date: Tue, 15 Feb 2022 10:05:24 +0800 Message-Id: <20220215020524.44268-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 The print function dev_err() is redundant because platform_get_irq() already prints an error. Eliminate the follow coccicheck warnings: ./drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1661:3-10: line 1661 is redundant because platform_get_irq() already prints an error ./drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1642:4-11: line 1642 is redundant because platform_get_irq() already prints an error ./drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1679:3-10: line 1679 is redundant because platform_get_irq() already prints an error Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index 6914e992a02e..e564c78ff910 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -1638,11 +1638,8 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba) idx = i * HISI_SAS_PHY_INT_NR; for (j = 0; j < HISI_SAS_PHY_INT_NR; j++, idx++) { irq = platform_get_irq(pdev, idx); - if (irq < 0) { - dev_err(dev, "irq init: fail map phy interrupt %d\n", - idx); + if (irq < 0) return irq; - } rc = devm_request_irq(dev, irq, phy_interrupts[j], 0, DRV_NAME " phy", phy); @@ -1657,11 +1654,8 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba) idx = hisi_hba->n_phy * HISI_SAS_PHY_INT_NR; for (i = 0; i < hisi_hba->queue_count; i++, idx++) { irq = platform_get_irq(pdev, idx); - if (irq < 0) { - dev_err(dev, "irq init: could not map cq interrupt %d\n", - idx); + if (irq < 0) return irq; - } rc = devm_request_irq(dev, irq, cq_interrupt_v1_hw, 0, DRV_NAME " cq", &hisi_hba->cq[i]); @@ -1675,11 +1669,8 @@ static int interrupt_init_v1_hw(struct hisi_hba *hisi_hba) idx = (hisi_hba->n_phy * HISI_SAS_PHY_INT_NR) + hisi_hba->queue_count; for (i = 0; i < HISI_SAS_FATAL_INT_NR; i++, idx++) { irq = platform_get_irq(pdev, idx); - if (irq < 0) { - dev_err(dev, "irq init: could not map fatal interrupt %d\n", - idx); + if (irq < 0) return irq; - } rc = devm_request_irq(dev, irq, fatal_interrupts[i], 0, DRV_NAME " fatal", hisi_hba); -- 2.20.1.7.g153144c