Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1222658pxb; Wed, 4 Nov 2020 03:20:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbqUaCpQlowGZ+HnfmGmybau3cG6ZjgEBgS6JJFB2mhjG9JfovfXZ4uqq9ZphYicenvFiv X-Received: by 2002:a17:906:a195:: with SMTP id s21mr23363826ejy.146.1604488840125; Wed, 04 Nov 2020 03:20:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604488840; cv=none; d=google.com; s=arc-20160816; b=eAOqfcmqHXB6ndAvtN2KHm8x8t/ExTPfotc39HU3lTZN7/XdJBfaVPVHBa9HeomXJZ cbEo+oiIy2uEChbqWQFMB6l5IHzc7Lp1g4uxZ8pKMepmuJvMXht+VlMFYZyITaIdHyPu 2oLIOssafRWXOjPJzmBxWOpNHdpMQ4G/EjO03S9TOw5lMSVchxKt4AJDd+xNyUDk0mX7 il9ewDCcfg//zaUwwKRoorodXX8LyPF0NAXZYNX+4JXT1mBF0XhDfQxaUwFBIa06ooQL 5xaNSljUoxt+bRb7m1v7Ked5sdFAb16SMIPwdZpMQcI9ShKfIRtdQswlWUt+BKz9UNkm Y4aA== 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 :references:in-reply-to:message-id:cc:to:subject:from:date; bh=+//P+Qa48bXCOQcQLX4ZtQ7ojF22cr81Nrq0ZWV0kUc=; b=XtouAKDfg72AV5WU+NR2LnL1F3HkTua/IeYeHgOBNJmXEY5XLfGsldstNhcTAHKJzF JmBWvUZrwkLVx8l8vfBnY0Ja+TQT9o8EdbgP+ggUZvoMebqlRqV9OhVQZM0lCIvwZMra RJT7OIsw41g8Lnlx1Zrz7cwtrf5dRWFizeBMdliq2Ag/jo0u/XlCIMrRWsLqYpdhSprs rk0i3ulTUFZkm3HVk8GM8K0CZG2k4rst4/N1zMv6M0vIlgfRhzfM6SWDv3h4TEr9uY0m HE0vlmGChluyc1KCCxujYxMr/q6eGVj7WEAZK47J9FBALs/K4zdahmgnz9qHlh13WiyQ XNrA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q22si1199774ejs.100.2020.11.04.03.20.18; Wed, 04 Nov 2020 03:20:40 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729378AbgKDLRd convert rfc822-to-8bit (ORCPT + 99 others); Wed, 4 Nov 2020 06:17:33 -0500 Received: from aposti.net ([89.234.176.197]:49088 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729427AbgKDLRW (ORCPT ); Wed, 4 Nov 2020 06:17:22 -0500 Date: Wed, 04 Nov 2020 11:17:02 +0000 From: Paul Cercueil Subject: Re: [PATCH] clk: ingenic/TCU: Remove NULL pointer check before clk_enable/disable To: Xu Wang Cc: mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.or, linux-kernel@vger.kernel.org Message-Id: In-Reply-To: <20201104071114.6322-1-vulab@iscas.ac.cn> References: <20201104071114.6322-1-vulab@iscas.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Le mer. 4 nov. 2020 ? 7:11, Xu Wang a ?crit : > Because clk_enable and clk_disable already checked NULL clock > parameter, > so the additional checks are unnecessary, just remove them. > > Signed-off-by: Xu Wang Reviewed-by: Paul Cercueil Cheers, -Paul > --- > drivers/clk/ingenic/tcu.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/clk/ingenic/tcu.c b/drivers/clk/ingenic/tcu.c > index 9382dc3aa27e..ffcb3667fd2b 100644 > --- a/drivers/clk/ingenic/tcu.c > +++ b/drivers/clk/ingenic/tcu.c > @@ -445,8 +445,7 @@ static int __maybe_unused tcu_pm_suspend(void) > { > struct ingenic_tcu *tcu = ingenic_tcu; > > - if (tcu->clk) > - clk_disable(tcu->clk); > + clk_disable(tcu->clk); > > return 0; > } > @@ -455,8 +454,7 @@ static void __maybe_unused tcu_pm_resume(void) > { > struct ingenic_tcu *tcu = ingenic_tcu; > > - if (tcu->clk) > - clk_enable(tcu->clk); > + clk_enable(tcu->clk); > } > > static struct syscore_ops __maybe_unused tcu_pm_ops = { > -- > 2.17.1 >