Message ID | Y5Wwo6Gr1rJOdf3B@qemulion |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1708705wrr; Sun, 11 Dec 2022 02:39:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf6lwJ/ACjLImkCLD22KYqCNWlEGTggE08Kp+sBHxnB1HI/X1bF0OO48Wj/0AGX2jSwljlbI X-Received: by 2002:a05:6a20:669a:b0:9d:efbe:e5f3 with SMTP id o26-20020a056a20669a00b0009defbee5f3mr14453155pzh.15.1670755166053; Sun, 11 Dec 2022 02:39:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670755166; cv=none; d=google.com; s=arc-20160816; b=gsXVHCM5x22gvMtj0E42nJ2ij+cjaLeyvc6wTeoEaMYSR8fo42KRqt+ONVBps8kwT2 yuCHeurpEf0VFxEp2kMEtUIxABqwvTZwxMiQRwIr7JjqaT0w2PhuHuoz8vSK9kZ5UjgS so7na8TJ++zgpgvVnE4lqam22D/ZDmdT1FEw4oMQBycmzmPPoCo6GiaU8kkoJI9K7Fcb Gop8moY0+bCznGqDX5US4oegpzv1nth7yUT3ucshAq05Wlu5RV/fVN5Ua9RuBRv0wHGt 0JS8cib3aVV5qYshVtKPfdeiNiI3cmtd5o48d6ftwlta110YlFLDxtMnw2q2tkCPBO5A tDEw== 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=99PWHk8EA6JLd2vsverobEX2h9ew8+elmcS2UMSjgoE=; b=S+5C/MAgjY48Q0yvz/rKZ/MAYTwAJqa/wby1908HX3yt/CiAR/uRKYuN9+gLy1IJJg p9MTBuvW26Kup8y1CUoKjLlMhqd0zPzbdcARdg3F1oEtzZgoPWG3uCpNvF8O6PLMh4A7 wQyXkoFG6ZD/3WJIw8cqNes8dDU2FvQs8zfBO6le1u6QUI2Cl1mPjA70VFcCBIJzPS1p H4MTfq4ZHCgcopvtTgK57cRvMzfb0nFRj5x/psv91/oRlSA5Y/9wMstdo8KpzTd0/nU3 DGjEy85ydXPATz8vAPsGj95ondtRW1ub1qtR/tmnsfLlKjmxDPumgrFax/2oLSVZNOTz hRUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=hR1Mrwjc; 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 127-20020a630985000000b00477abe15f06si6813268pgj.63.2022.12.11.02.39.07; Sun, 11 Dec 2022 02:39:26 -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=hR1Mrwjc; 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 S229938AbiLKK2K (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Sun, 11 Dec 2022 05:28:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229568AbiLKK2G (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 11 Dec 2022 05:28:06 -0500 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A50FB1021 for <linux-kernel@vger.kernel.org>; Sun, 11 Dec 2022 02:28:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1670754472; bh=h5ZsvKk0jLOMltEX2Tm3YLW0RimP91lrdUzmymUhPh0=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=hR1MrwjcI5uIJ0PoDlu93756wQ7ZD0S87+zzlIHySLa7PEuMb5rIMOJnjmaXsC4dh IL1pSBWHkKCgy+O9XAoM7CT+gIjX+VAbk7g3sjF8RTD34YXO5Fp05mL3YYEYTYActF 4Y98BT+texc20t5TWcPQf/wJX7JLp2k5/O94u918= Received: by b-5.in.mailobj.net [192.168.90.15] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sun, 11 Dec 2022 11:27:52 +0100 (CET) X-EA-Auth: M5fmEULy5RJ4vQRVAfSZc6NK/yB1xxCg8DoyViGqtSK55fxLDJDylPnIf4dbbWeHekc09LKvMmBnrZj2pmEHyGaGJMyxFoAS Date: Sun, 11 Dec 2022 15:57:47 +0530 From: Deepak R Varma <drv@mailo.com> To: Stefan Agner <stefan@agner.ch>, Alison Wang <alison.wang@nxp.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar <ssengar@microsoft.com>, Praveen Kumar <kumarpraveen@linux.microsoft.com>, drv@mailo.com Subject: [PATCH] drm/fsl-dcu: Remove redundant error logging Message-ID: <Y5Wwo6Gr1rJOdf3B@qemulion> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751913768685072632?= X-GMAIL-MSGID: =?utf-8?q?1751913768685072632?= |
Series |
drm/fsl-dcu: Remove redundant error logging
|
|
Commit Message
Deepak R Varma
Dec. 11, 2022, 10:27 a.m. UTC
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 <drv@mailo.com>
---
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--
2.34.1
Comments
On Sun, Dec 11, 2022 at 03:57:47PM +0530, Deepak R Varma wrote: Hello, May I please request a review and feedback on this patch proposal? Thank you, ./drv > 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 <drv@mailo.com> > --- > drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c > index 8579c7629f5e..1ba7d95e1956 100644 > --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c > +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c > @@ -272,10 +272,8 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev) > } > > fsl_dev->irq = platform_get_irq(pdev, 0); > - if (fsl_dev->irq < 0) { > - dev_err(dev, "failed to get irq\n"); > + if (fsl_dev->irq < 0) > return fsl_dev->irq; > - } > > fsl_dev->regmap = devm_regmap_init_mmio(dev, base, > &fsl_dcu_regmap_config); > -- > 2.34.1 >
On 2022-12-11 11:27, Deepak R Varma wrote: > 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 <drv@mailo.com> Reviewed-by: Stefan Agner <stefan@agner.ch> -- Stefan > --- > drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c > b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c > index 8579c7629f5e..1ba7d95e1956 100644 > --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c > +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c > @@ -272,10 +272,8 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev) > } > > fsl_dev->irq = platform_get_irq(pdev, 0); > - if (fsl_dev->irq < 0) { > - dev_err(dev, "failed to get irq\n"); > + if (fsl_dev->irq < 0) > return fsl_dev->irq; > - } > > fsl_dev->regmap = devm_regmap_init_mmio(dev, base, > &fsl_dcu_regmap_config); > -- > 2.34.1
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c index 8579c7629f5e..1ba7d95e1956 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c @@ -272,10 +272,8 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev) } fsl_dev->irq = platform_get_irq(pdev, 0); - if (fsl_dev->irq < 0) { - dev_err(dev, "failed to get irq\n"); + if (fsl_dev->irq < 0) return fsl_dev->irq; - } fsl_dev->regmap = devm_regmap_init_mmio(dev, base, &fsl_dcu_regmap_config);