From patchwork Wed Mar 1 19:18:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 63044 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp3822154wrd; Wed, 1 Mar 2023 11:25:09 -0800 (PST) X-Google-Smtp-Source: AK7set8mCBTYTQjuUA4iCH/nShOTQ81vXjdOWG19fHj/k0bKwFqn3liu5MScAhmMKQwAUJKUTv/H X-Received: by 2002:aa7:c1c6:0:b0:4aa:f932:6f49 with SMTP id d6-20020aa7c1c6000000b004aaf9326f49mr8132869edp.8.1677698708887; Wed, 01 Mar 2023 11:25:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677698708; cv=none; d=google.com; s=arc-20160816; b=XafZaQqEDT9uY+QMmnSNA9sNHdKeGx/ZFOKB1uJIFi7cOPIFN+SnTXyMtcFNycn1jT k7gfRSz4wrvl0d7ELNT57VEUUCPUgeOc9mGy8uLls4KBVsmVqUMCIw0OgjZ3mAfCGIwm 5lvCHeXsqn/65+66kMecIKXUb9xN2ROQeWlRg+rD6OcjLMbknqVQvCH8v5/FWDys4xGN tQ02fvcQeOEJf3fHOf22uhBeZYKl9mlqXguKY72P+oth0GP5H268ZUcc1Kl2IFrZSD6G ZDBiGalhSm9CxUEBFvUrcPU71nFsryCi38bV+Av8lxdMBXsikPW0Rjk03GtsFIVVmdOI RPYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=NHSuuJH5KfquJPa1oPu8sfU94PQBFF/whXa/58LT0t4=; b=SmqvgSYtLvJ/W5ClWazyguPDpq8E7Bv+PEmjN+fylrW7zhq9aCwdzlqiuQuZJZCm94 3YHgbNUrTFnsUEn+VGXX4dkh9HqlI5eM4HZsdEZ9RxLtSC0yzzi6OYRsR3fE8Fg2YyyG ik/6gcF56IGLNxvCF0wn/wPHhQZd4pTK0GYcpo6FhHnbuavaL17kChAYaFwp95pFIVoK CI2Qtup9BjkYuWDx9RfCpYpYOtPZYwMV4NB2RNWfEKxAmv9IF+dljSt1J9As3qpdQiKU k6xtrs9Cn3CsGaM8fdV+AhwT8wv+n7mAxD+ofjwXbBFzI2H973EE8Wwbdlq0yZGDkO6C nvBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=cVZYUaZg; 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=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id re13-20020a170906d8cd00b008d8e8262d15si3470516ejb.548.2023.03.01.11.24.45; Wed, 01 Mar 2023 11:25:08 -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; dkim=fail header.i=@mailo.com header.s=mailo header.b=cVZYUaZg; 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=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229861AbjCATSn (ORCPT + 99 others); Wed, 1 Mar 2023 14:18:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjCATSm (ORCPT ); Wed, 1 Mar 2023 14:18:42 -0500 Received: from msg-4.mailo.com (msg-4.mailo.com [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C3001EBC2 for ; Wed, 1 Mar 2023 11:18:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1677698315; bh=ogcEBaEy1wZAdHGyLeSR8qWSOuPxWcnTW1vgZPpNF7g=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=cVZYUaZgQCNYgW+huld/Ew+w+uy52upTvmhUeWnF0LcAFVQOcpIWMCaa8h7g3bCau bjb8TJ/WbA5H7kz4Cf7RQjQJ6k6Txpb1ur1xtmYgVeZIaL9QVnCAACbO3hdJh0A/GD E8NEm+fDgpicWQ4FFsF+zi/GGw0OJn4yeiGsE9Gc= Received: by b221-2.in.mailobj.net [192.168.90.22] with ESMTP via ip-20.mailobj.net [213.182.54.20] Wed, 1 Mar 2023 20:18:35 +0100 (CET) X-EA-Auth: riO4H6yjRbeC5UwPFxBDYasXlEjMvqpapw0hlfyMNHgHFlSLPSGxpF9WZrPjX/YF0BgGiJbM+3h2bJNcJHEndQ== Date: Thu, 2 Mar 2023 00:48:29 +0530 From: Deepak R Varma To: Thierry Reding , Jonathan Hunter , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar , Praveen Kumar , Deepak R Varma Subject: [PATCH RESEND] soc/tegra: cbb: Remove redundant error logging Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759194601036789216?= X-GMAIL-MSGID: =?utf-8?q?1759194601036789216?= A call to platform_get_irq() already prints an error on failure within its own implementation. So printing another error based on its return value in the caller is redundant and should be removed. The clean up also makes if condition block braces unnecessary. Remove that as well. Issue identified using platform_get_irq.cocci coccinelle semantic patch. Signed-off-by: Deepak R Varma --- Note: The patch was successfully build tested for ARM64 config. Resending the patch for review and feedback. 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 a8566b9dd8de..d9ce3d70813a 100644 --- a/drivers/soc/tegra/cbb/tegra-cbb.c +++ b/drivers/soc/tegra/cbb/tegra-cbb.c @@ -127,20 +127,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;