From patchwork Sun Dec 11 13:55:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 32193 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1780416wrr; Sun, 11 Dec 2022 06:05:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf58LRHHIzzmitJ7EG9HfKCQrjZ5K8bPE9ml5wDBwfMF9vB/kwwNx1owh4HAvjV/ne26r1lz X-Received: by 2002:a17:906:5f82:b0:7c0:dac7:36ea with SMTP id a2-20020a1709065f8200b007c0dac736eamr10839210eju.66.1670767554025; Sun, 11 Dec 2022 06:05:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670767554; cv=none; d=google.com; s=arc-20160816; b=Rj269FVpcP8gpR3KfeN6VDlEnXNddEuTOQ5sY201G9PEo8AuyKgN63AKSL12FWT06s M2mKielfqtDJvSkHEGz9Ie5Km8G4MXTWPIP4SzYonkoICiW7dBWIZ3TCp5NAXnzPNWEK 1GEiGyzR1yrOcUpwPyj5uhTxd+GMyz8V6TkiOH0P/8WcDADZ6WjpyVjWPMKCyrfG8YSl cBwGv0elZBhfZ2r9JNPghrg2jTUAsubN/EgsHzOrSzAYKBr8dFqQabYumiXvqU02XMLt SzsQs+Q/RACRoA60PIKlYe99/0OunHVGr/d8ZU7hJdf2vg/KsfScvwW6GauyVS/OumcD Vwjw== 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=Z3aLbqmT/nbwosbVma9CyWWzC4rITcyhzveYgD0OWXM=; b=i082+LBSVazDgPoUjal2I0e5SNRTrYO7HuK8MgXQz8xSxqWb5Vp08Vd8LKPfkIFbSn rm5C1zQaxHazLdhjs2zIFQgi2QCCBSuax2mK7ijX1TSe1ouOOHsJHmAWsCC4O/S4+iDr rptOucUzm708jkaVbt5N4cBviDlE/fT9pI9lu0wAciJyp2Assj7vlgJAqzoUfJzvmhsJ ST6pl5pn0RmW1/WLaFsv+t8MaqiUVDMUe9eBTnuvxOkYC20Fml79GGOPpOB21PjiuvbF JnyYrjibWQfg97sYFwB40yXZYG2MOj/SMIqTDibKHlVhOXmt5+sEIFXcgNQj2jip8IQc 82pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=Lw7qSXIe; 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 qb42-20020a1709077eaa00b007c08578ed86si5105926ejc.960.2022.12.11.06.05.27; Sun, 11 Dec 2022 06:05:53 -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=Lw7qSXIe; 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 S230080AbiLKNz2 (ORCPT + 99 others); Sun, 11 Dec 2022 08:55:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbiLKNz1 (ORCPT ); Sun, 11 Dec 2022 08:55:27 -0500 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 280BDBE0F for ; Sun, 11 Dec 2022 05:55:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1670766913; bh=xq+tOsyd0WnEBYZsDftkiZ/K0hXxhKqmak3ozClnAhA=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=Lw7qSXIeqY0zeGmSKrp3dOZ2ty0Y08YgUu/NU5OcVnZmRzmnrbv3QgL2NPJrD69rM zqjp4YLX3kM8FyRwyTwpBfS+vT/ECHRIHWCBGJhzXIk0YPdsMGeM0+icZpxRXX6Lnw dDZZujg51h0XESzbuOdd96640l5W2EFTrqla60nI= Received: by b-6.in.mailobj.net [192.168.90.16] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sun, 11 Dec 2022 14:55:13 +0100 (CET) X-EA-Auth: 1vJpOd6xvyZUc0g7UMKSJAb/DUIrntROzP0Ci/lss0NuJBvm6qAzgGmuTPxapEaAUk3yo/Bjo0fCa7hkbNJRkqgJMiaiOOVj Date: Sun, 11 Dec 2022 19:25:08 +0530 From: Deepak R Varma To: David Airlie , Daniel Vetter , Orson Zhai , Baolin Wang , Chunyan Zhang , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar , Praveen Kumar , drv@mailo.com Subject: [PATCH] drm/sprd: 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?1751926758483312171?= X-GMAIL-MSGID: =?utf-8?q?1751926758483312171?= 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 coccicheck script. Signed-off-by: Deepak R Varma Acked-by: Chunyan Zhang --- drivers/gpu/drm/sprd/sprd_dpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.34.1 diff --git a/drivers/gpu/drm/sprd/sprd_dpu.c b/drivers/gpu/drm/sprd/sprd_dpu.c index 88f4259680f1..db0bcea1d9f4 100644 --- a/drivers/gpu/drm/sprd/sprd_dpu.c +++ b/drivers/gpu/drm/sprd/sprd_dpu.c @@ -803,10 +803,8 @@ static int sprd_dpu_context_init(struct sprd_dpu *dpu, } ctx->irq = platform_get_irq(pdev, 0); - if (ctx->irq < 0) { - dev_err(dev, "failed to get dpu irq\n"); + if (ctx->irq < 0) return ctx->irq; - } /* disable and clear interrupts before register dpu IRQ. */ writel(0x00, ctx->base + REG_DPU_INT_EN);