Message ID | Y/+r9jOO0s8sG4pX@ubun2204.myguest.virtualbox.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp3834368wrd; Wed, 1 Mar 2023 11:52:38 -0800 (PST) X-Google-Smtp-Source: AK7set+SQJXBzk3Nd54LDO0j8YymbjSqUzcaxfN9FhjWSUgpabfZxq1GtfCV5mBwrtFIGK65J0cr X-Received: by 2002:a05:6a20:4419:b0:ce:3311:a7b7 with SMTP id ce25-20020a056a20441900b000ce3311a7b7mr4547509pzb.9.1677700357942; Wed, 01 Mar 2023 11:52:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677700357; cv=none; d=google.com; s=arc-20160816; b=gEEBkvZa8+baV96jK2VCsgyUQtRZrHimSdci0wb8/BAJ2j7/nJeihVcQ35AYpYLI8P JJTzf7Ooi7LG8OaqsxVJFSntB9/AMQzC+NjuQ9dy0xbambP4JhdJ8FadW+5ZjRxqUlDe nUNCxTa+afj4fIJjq84LAsEh6hsSchY739E4YjY7nY071L0sRm2XA9a80ugQwWL+LE0V YAb9R7R6ZTlgXfsZNOW5YuGCqgawKPF6D07rDyryK9zj+0poq48GTwL4s6ei7XnQ3BVB 5TvK0xxFdylBbr0ccdD/8OG8wVOzweZyONQUblCJ9IH0IeuMVm5nBNqlCHQuucZz9PeW PdMA== 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=3/z5YjRSDywXWh5kII9uhpwPkkG1vU5I8iSs+Wf1rFE=; b=dncuEsRcIvW54oKTkYbSOBm0kNTSM2SmgsDPF60PZ4YfHYdkHhL+uX5aEmw9YnIIIe MIaARevZU6LJ+tcXYwR2Y+0KJn4tn+VfX45ri/ww+XrYSA1Tb6c0vribYRv6VMw5iP2D uGn0LDzroGj/bUqtdifwyX9zkyAlS2An7lhgO1COiwzLZuXgZ6U0qznGlC43gvJxHGFd 7G2AvPqsJ2A0f/yCtMDZxwhkFtM8bXTT95obrhK7w1i34GkkJAsAaFZvBvB0WLBVQnGA dS1XqWIfRfpX1+x5q+difJxxlx3mZTXzjU/ezB8wCIuEzXtrrgTEtHsNY+SV0Nc4Ox4y u4cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=gV519zEm; 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 v190-20020a6389c7000000b0050318a4a5casi12632096pgd.408.2023.03.01.11.52.23; Wed, 01 Mar 2023 11:52:37 -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=gV519zEm; 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 S229533AbjCATsm (ORCPT <rfc822;david.simonyants@gmail.com> + 99 others); Wed, 1 Mar 2023 14:48:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229557AbjCATsi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 1 Mar 2023 14:48:38 -0500 X-Greylist: delayed 1781 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 01 Mar 2023 11:48:20 PST Received: from msg-4.mailo.com (msg-4.mailo.com [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B3A8271C; Wed, 1 Mar 2023 11:48:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1677700090; bh=G8Do2SeddR9IDejdzfXb3mJ2yINZAw/nhNCrxZzNMRY=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=gV519zEmvj4C4oNOXlhBA9+i64aevboY1rgNNx4PKLxoEWW6JgKJP23itMrurDJfu Px3lCOp2lbebQetpUtp7f787ciPnF1tGcHMUxzwDk3J7DptzLHsxeo4WvkQw0I4Dlb AO/qcQ0oantrR6J9L7YSOsn1DyVmzDhUcQeT/W5M= Received: by b221-1.in.mailobj.net [192.168.90.21] with ESMTP via ip-20.mailobj.net [213.182.54.20] Wed, 1 Mar 2023 20:48:10 +0100 (CET) X-EA-Auth: hASAmwc8c6mMvRs+drNOd7GE2MX2lpbv4ZZC16GwJGIyF7aeVvkjA9YVkK/0oDZC1lfNol3EpAbLXaI5MtKzcX/mGBkLHTrw Date: Thu, 2 Mar 2023 01:18:06 +0530 From: Deepak R Varma <drv@mailo.com> To: Thierry Reding <thierry.reding@gmail.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Jonathan Hunter <jonathanh@nvidia.com>, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar <ssengar@microsoft.com>, Praveen Kumar <kumarpraveen@linux.microsoft.com>, Deepak R Varma <drv@mailo.com> Subject: [PATCH RESEND] drm/tegra: sor: Remove redundant error logging Message-ID: <Y/+r9jOO0s8sG4pX@ubun2204.myguest.virtualbox.org> 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?1759196330530775728?= X-GMAIL-MSGID: =?utf-8?q?1759196330530775728?= |
Series |
[RESEND] drm/tegra: sor: Remove redundant error logging
|
|
Commit Message
Deepak R Varma
March 1, 2023, 7:48 p.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>
---
Note:
Resending the patch for review and feedback. Originally sent on Dec 12 2022.
drivers/gpu/drm/tegra/sor.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Comments
On Wed, 01 Mar 2023 11:48:06 -0800, 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. Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> > > Signed-off-by: Deepak R Varma <drv@mailo.com> > --- > Note: > Resending the patch for review and feedback. Originally sent on Dec 12 2022. > > drivers/gpu/drm/tegra/sor.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c > index 8af632740673..ceaebd33408d 100644 > --- a/drivers/gpu/drm/tegra/sor.c > +++ b/drivers/gpu/drm/tegra/sor.c > @@ -3799,10 +3799,8 @@ static int tegra_sor_probe(struct platform_device *pdev) > } > > err = platform_get_irq(pdev, 0); > - if (err < 0) { > - dev_err(&pdev->dev, "failed to get IRQ: %d\n", err); > + if (err < 0) > goto remove; > - } > > sor->irq = err; > > -- > 2.34.1 > > >
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 8af632740673..ceaebd33408d 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -3799,10 +3799,8 @@ static int tegra_sor_probe(struct platform_device *pdev) } err = platform_get_irq(pdev, 0); - if (err < 0) { - dev_err(&pdev->dev, "failed to get IRQ: %d\n", err); + if (err < 0) goto remove; - } sor->irq = err;