Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1170210pxu; Fri, 16 Oct 2020 05:48:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylxzgSOUnMjPwtja74ZkwouOvL4d36NYTPcv34FLKdvianlvHV6VAEsuESz6Qs77MgCNrV X-Received: by 2002:a17:906:38c9:: with SMTP id r9mr3736640ejd.9.1602852514962; Fri, 16 Oct 2020 05:48:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602852514; cv=none; d=google.com; s=arc-20160816; b=tho7iAJs/JbLEZN/TESLs93VtySbGmsgaiyKWkiPPfIX5um0X0xBvZ28siWvdiZf6C E/oKYAD8wq/TlTOdZTMTgaj7FQ6tzPNSIFEnAzfXZYNKVHqMgEP1tbqxwUTxcI0w9aSl TM/TfsBKQ2p/xAQ6o2W/he1ZBoO6eeH13heRVeXCPsAWFXKPB73cZCIO0mZrkMhAK8ch zurXb4h3qkUb2pzvFDRcu2hTVuE62ijfbjs945sL6gRPFwbTckWAzaEQgDsJHfje0H96 v7+//bHZ0Q9ZsZiaT/P1LviqpoUFNCLBHIrQo6pAIkoCIDUTHUvWhzfPuFYa9vQK7PuA yDiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=3rXMstanvqk2KHI5RN84axZSDdYXpAtIfqT08izi6/8=; b=mVp4+BLSR3r96+RTI2Ogbnl9m3A55UwS8LW2RQKp7Wn6T3Nva21EzFZW6QaLv1syM6 saS8fjq/2ggGu9IWpZj4pq9VFQNgDylBPfQ3NgGNb/1vi0oWnLcrhb3aCvJICIPQbJ6n FQAekxt/XY8RMp7iCDl7xrpRUmneWuAJknmWy8NOav3y9wAyCqhE/EGkCCa4dGEvSPzA ZirciNnHx/a4e1p+ygTsuBFMXftA6ZmrCTCcX8BDrovoxYL1RS3AcGZbnEBuKCHu/Xvr 5wK1YBgar/QNox11vHQjExlTa56aRxi5TMBeINSTvvuupDIwSTR2oSsXdbb0jPzxiyOl h7Sw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i20si1672186edb.116.2020.10.16.05.48.12; Fri, 16 Oct 2020 05:48:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406430AbgJPJx7 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 16 Oct 2020 05:53:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:42374 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406424AbgJPJx6 (ORCPT ); Fri, 16 Oct 2020 05:53:58 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5F341AD0D; Fri, 16 Oct 2020 09:53:57 +0000 (UTC) Date: Fri, 16 Oct 2020 11:53:56 +0200 From: Thomas Zimmermann To: Xu Wang Cc: b.zolnierkie@samsung.com, pakki001@umn.edu, yuehaibing@huawei.com, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH] omapfb/dss: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare Message-ID: <20201016115356.34c1620b@linux-uq9g> In-Reply-To: <20201015100827.1115fa9b@linux-uq9g> References: <20201014084920.25813-1-vulab@iscas.ac.cn> <20201015100827.1115fa9b@linux-uq9g> Organization: SUSE Software Solutions Germany GmbH X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Oct 2020 10:08:27 +0200 Thomas Zimmermann wrote: > On Wed, 14 Oct 2020 08:49:20 +0000 Xu Wang wrote: > > > Because clk_prepare_enable() and clk_disable_unprepare() already checked > > NULL clock parameter, so the additional checks are unnecessary, just > > remove them. > > > > Signed-off-by: Xu Wang > > Reviewed-by: Thomas Zimmermann > Merged into drm-misc-next. Thanks! > > --- > > drivers/video/fbdev/omap2/omapfb/dss/venc.c | 6 ++---- > > 1 file changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/video/fbdev/omap2/omapfb/dss/venc.c > > b/drivers/video/fbdev/omap2/omapfb/dss/venc.c index > > 0b0ad20afd63..8895fb8493d8 100644 --- > > a/drivers/video/fbdev/omap2/omapfb/dss/venc.c +++ > > b/drivers/video/fbdev/omap2/omapfb/dss/venc.c @@ -890,8 +890,7 @@ static > > int venc_remove(struct platform_device *pdev) > > static int venc_runtime_suspend(struct device *dev) > > { > > - if (venc.tv_dac_clk) > > - clk_disable_unprepare(venc.tv_dac_clk); > > + clk_disable_unprepare(venc.tv_dac_clk); > > > > dispc_runtime_put(); > > > > @@ -906,8 +905,7 @@ static int venc_runtime_resume(struct device *dev) > > if (r < 0) > > return r; > > > > - if (venc.tv_dac_clk) > > - clk_prepare_enable(venc.tv_dac_clk); > > + clk_prepare_enable(venc.tv_dac_clk); > > > > return 0; > > } > > > -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer