Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 403FAC7EE23 for ; Wed, 1 Mar 2023 20:04:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229733AbjCAUEm (ORCPT ); Wed, 1 Mar 2023 15:04:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjCAUEj (ORCPT ); Wed, 1 Mar 2023 15:04:39 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FC0247406; Wed, 1 Mar 2023 12:04:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677701079; x=1709237079; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=+r/NXFHFspaRacMbjVlJbFHmHDbRNx1tVU7ZmSJxHxg=; b=Kq01VjhkdlcXR5u8TF53wO501KHDsjzTHNrLELrVt95+KHj+FScFkwy6 YKh3EXhfN896Zg466yfdQgpvyn4+B0wLPGI83bO5M1YSk6jKzT6SRxxIN 10HD+KWfn/DJfnQ34BNxmJ1ItITV9oJHEup84aTC4dNrmxe3PlFMOQyHk DCc3xeX3it6fBXBMvMHdWL0nKI4OeFigHehsn+sXDT3EoPnIes/pwwu/D m33/0m3W/pBUSc4orKpL33V87WIQMDxtNtP9GcrHLU5R3WiuNG54rJY7R uww6U1+Gjfq3aoF7ExyjaFaK52tF4wWO5lLTe1FjgWGJJmZGNDa5fccuv A==; X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="334538767" X-IronPort-AV: E=Sophos;i="5.98,225,1673942400"; d="scan'208";a="334538767" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2023 12:04:38 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="798539857" X-IronPort-AV: E=Sophos;i="5.98,225,1673942400"; d="scan'208";a="798539857" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.115.221]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2023 12:04:37 -0800 Date: Wed, 01 Mar 2023 12:04:37 -0800 Message-ID: <87pm9s44ru.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Deepak R Varma Cc: Thierry Reding , David Airlie , Daniel Vetter , Jonathan Hunter , dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Praveen Kumar , Saurabh Singh Sengar Subject: Re: [PATCH RESEND] drm/tegra: sor: Remove redundant error logging In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > Signed-off-by: Deepak R Varma > --- > 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 > > >