Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp121157iol; Wed, 8 Jun 2022 23:50:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1kjTQE7RvkDnOqMkV8NDl7jUPwHnCcwAFlffVKj6qpVsRmthTMA61vEqkvID3m9RNlizo X-Received: by 2002:a05:6402:cab:b0:42d:c842:8369 with SMTP id cn11-20020a0564020cab00b0042dc8428369mr43049342edb.181.1654757415820; Wed, 08 Jun 2022 23:50:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654757415; cv=none; d=google.com; s=arc-20160816; b=QsfPbMhJuZ32fFYawwCKcs/KdSmdtUvalD2hqeGDWN6w5ddZR2hSTRR9eSyGsGWi8A /8wLwgmTdWtMwI5lqxpgklUjta/YIkTPQbJxyA+Hjtt51P8HeXRNHwALHCh3vbWxY8Q+ RMO4pQZ4uvM8lpKtSvKUKKzKXG/xUlpFhygxx1eTXxAptsnWT+zsOrPnxlECT3WrApQh PWEdTaA2w5g/nVqxyTK3fCymfBRhcbZrsxiCfzuC6tVYLmxfyb9fPYBi3QMgzuw0UqmW wrYLKqJlWtCSBVeRAdEs3xKeScW8MrrwHyVQnqvhLlhuG3jeofskAwt5VAIEyI8msBWa gnJw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=PbjChnq1Q82lvUID525Yl2/nNvDgM4bLF94psnEWZl0=; b=UZUx+r1o0dGExSG/ScUWW4SP8yGonJHslJXAKK9LJAZBuuecotqxgGbeSqyzsYOXBy zu/KKs0TG0tjy3MlRiTGAoJ1LMfLmUzorhw1d3GAEQIRM9w5Ge9AKAgBFtqfAwCQ+wC4 Z9T48PJ7bTuLGZLgBJ3Vihf5UANCEXfQN7MLIEideQMOyEmhcCjQzVxVm5PEArUHxMni fjvecpfwo6FMVoBiFmilhUBQ0ZzCJYRgZ6ZTW+H8s8SC8XN+H7NpDmiuxZf+ZuE/HOIZ JjIBLySGEsvfvLOa0uj8njIPT29EgtiFz90YZzn4Y3rqfJkIr4+3imA5mXJKhkDJNErR 3lIw== 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 eb6-20020a0564020d0600b0042dd17920cesi4109249edb.172.2022.06.08.23.49.51; Wed, 08 Jun 2022 23:50:15 -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 S238074AbiFIFzr (ORCPT + 99 others); Thu, 9 Jun 2022 01:55:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236830AbiFIFzo (ORCPT ); Thu, 9 Jun 2022 01:55:44 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E4906141; Wed, 8 Jun 2022 22:55:41 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R911e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VFrCFzQ_1654754137; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VFrCFzQ_1654754137) by smtp.aliyun-inc.com; Thu, 09 Jun 2022 13:55:38 +0800 From: Yang Li To: broonie@kernel.org Cc: conor.dooley@microchip.com, lewis.hanly@microchip.com, linux-riscv@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next 1/2] spi: Remove unnecessary print function dev_err() Date: Thu, 9 Jun 2022 13:55:33 +0800 Message-Id: <20220609055533.95866-2-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c In-Reply-To: <20220609055533.95866-1-yang.lee@linux.alibaba.com> References: <20220609055533.95866-1-yang.lee@linux.alibaba.com> 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,RCVD_IN_MSPIKE_H2, 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 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 warning: ./drivers/spi/spi-microchip-core.c:543:2-9: line 543 is redundant because platform_get_irq() already prints an error Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/spi/spi-microchip-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c index 3bd285dd4964..d8ae25ccffa8 100644 --- a/drivers/spi/spi-microchip-core.c +++ b/drivers/spi/spi-microchip-core.c @@ -539,8 +539,7 @@ static int mchp_corespi_probe(struct platform_device *pdev) } spi->irq = platform_get_irq(pdev, 0); - if (spi->irq <= 0) { - dev_err(&pdev->dev, "invalid IRQ %d for SPI controller\n", spi->irq); + if (spi->irq < 0) { ret = spi->irq; goto error_release_master; } -- 2.20.1.7.g153144c