Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp3121125rwj; Mon, 19 Dec 2022 13:25:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf68O0JQqnJZ1gOum/IVfjb7pPJI1Z43IwvMiMQzaJw3QHSdKO8cR1Jz9XFtRosbCk6wjVIE X-Received: by 2002:a05:6402:3594:b0:46f:d376:4c97 with SMTP id y20-20020a056402359400b0046fd3764c97mr35512221edc.17.1671485118718; Mon, 19 Dec 2022 13:25:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671485118; cv=none; d=google.com; s=arc-20160816; b=EYML0Y+QugEXj3rUPnaKOJF+7DlR3mk0a2EonStFCOqJAtef7Pbs63pz41A2mXqvWC OQunM//KpB2oo4h6JipM43fRUwVERvrEkOyLtM5on04wBID4DGAuuA1lykPoJQUykeNY DuIFtCUbUE2fFzb1n96EYLn41atHo01li7uGcsUpNu0kacdcOJh4wvKRmQPMTb7kSH+c ROYrOvwbYEtzUL1GeSMBI5rNXEXoloe/ddCi/BvPLE+bedm+M8X2EJPEwAkIcZJLrQ4A w5+0PmaLzf7JPFHM/l3Zn5VUY/v4z11Fm59O56ybXNtIRkvBB2YpGoPv9JWNT2HrPuVD wBSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=C0BeEMHRKxt18r8KHRP2jm0/rZTO+B2WW0+lxZOO9ZY=; b=T2gUPlfs/1OyKi9iFwVoosvemGprwBpYZyNrJdvA2gxoF6MPwX4o4MgNZPax1ptbi7 CqzVippBR25LlBxx1DYVv8V5KokVrgZmNpI4wL9xQI/Lm1TdI49NVl13co5nq41HrJPO 6uFcydeRxjpJi71Cju1I5ZKsoBQK+sj6OOFtNZx5Jkq5qzEUKdnKXrJXHGP0UQNMEWoV KGFLh5jsvwD7n9vdvW2zuyZUOt+1A3r3+AObdokL7PrLfDG/7oR+G3tRSCH4wthy3CeH ieo71iUAnRDunCs0uNkfkzRNnrW5uR9Sg5/smRr+vE3e+aybwuX5igbji9rb3P3JKUq1 AhWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=dLqRjNyi; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020a05640242d000b0046af9fdf3f5si11052619edc.282.2022.12.19.13.25.02; Mon, 19 Dec 2022 13:25:18 -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=dLqRjNyi; 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 S230007AbiLSUz5 (ORCPT + 70 others); Mon, 19 Dec 2022 15:55:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231931AbiLSUzu (ORCPT ); Mon, 19 Dec 2022 15:55:50 -0500 Received: from msg-4.mailo.com (msg-4.mailo.com [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2882BF0D for ; Mon, 19 Dec 2022 12:55:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1671483337; bh=waCi45GdEdTwDkLLovTT2hmNdulmbavhyJqMsALuGDQ=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To; b=dLqRjNyilTr7mIMwT2/JTnrKremz09RAY7UNTEESt/F4CtiEewh98v/1AvrGe8WIq 3yHYfaD/a5GZ1z67Z7EYG/fNOtVogx/PT+1Ml8Y7HMEK+C9fU2dKfL1c8UsIFU8q4Q hEG6y9I9angkB2dCvdaSI/EWh+wr1kLpmO58dMMY= Received: by b-2.in.mailobj.net [192.168.90.12] with ESMTP via ip-206.mailobj.net [213.182.55.206] Mon, 19 Dec 2022 21:55:37 +0100 (CET) X-EA-Auth: X7OgntSeEwUep+7q3TqTeZXw7KjXoM8PSczU0FZ1xHjtCg6EB278jhA0NJruH5+8nhteGA5v1YCNAjVNCmMT/vLkxAobcNRG Date: Tue, 20 Dec 2022 02:25:32 +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: Re: [PATCH] drm/sprd: remove redundant error logging Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Sun, Dec 11, 2022 at 07:25:08PM +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 > --- > drivers/gpu/drm/sprd/sprd_dpu.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > 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); > -- > 2.34.1 >