Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1062919pxu; Fri, 16 Oct 2020 02:55:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwN3Geuc1ZCN9nGAOUu5NL3n/0+b3yqumbbynNPSSbAJXzrb8m3lbDf4hLfBNpaewTDj9Bs X-Received: by 2002:a17:906:ad94:: with SMTP id la20mr2804770ejb.522.1602842117615; Fri, 16 Oct 2020 02:55:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602842117; cv=none; d=google.com; s=arc-20160816; b=GeR40AEQLkH+nNV/OC7Rs3g7XE4h6P6rP1RgfLnuQW2bls4CPsdFCucmmjyg32Gzup Fwsqxr/K/2nzlrHxOH+97QTWWVt42XE3hzOiiusUKquUFVFP1fU+ITi66JpUWNUg68KF cBOTMB8zPX9LCUv5EZgfMgcYjE0Nyx85/QtxKwb1FGQxoWm8PqXISjuz12HOrhfhWgKP Dz5euh2SQj7V3KHgut4leGpp6dfOA6L2yqTqkd44CEo2Gnrv+y5EXfPUAtVyrUsZxw2t DlNMgbBdfHNhjJ1L6eKUbnglUJqDi1ripMT9uMbt9NQXdunAfTbqFNLw8paE2j3bUYeR i/xw== 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=SWDVHOw73OT2Mdr9bW03a+4fG10W2YtDkKcpy+H3K9kJ2+zHHngtmxepyMUFUwsWQ5 azLwcMhazrMTZYa9gpYhSwZ3crh+i7ZtgEBuKS6cYqs82k0F0VRUGTkbIccKizD4U8vq SAgbRRuBVQhpkabDWYbFImmXq7b2iI8lw3RusJeKFLN1Ac9txcienhnUWGWD3FTOKhVz wN5V+pDNTA+etbcLtFAkerGfhDOIhBt97iQapETZWmDTlADwPu0tlW66fvUHw8FNIHeG tJy2x3VVsnPD1Bn51pRD4owNuus/Vu8TLXoFY480MK0jrF/28S3X9mvKjJzr/85JYjyG pJXA== 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 k15si1310734eds.533.2020.10.16.02.54.53; Fri, 16 Oct 2020 02:55:17 -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 S2406419AbgJPJxg convert rfc822-to-8bit (ORCPT + 99 others); Fri, 16 Oct 2020 05:53:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:42070 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406400AbgJPJxg (ORCPT ); Fri, 16 Oct 2020 05:53:36 -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 1A87CACF1; Fri, 16 Oct 2020 09:53:34 +0000 (UTC) Date: Fri, 16 Oct 2020 11:53:31 +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: <20201016115331.0dd4341e@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