Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp195744iog; Sun, 12 Jun 2022 23:59:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgWk6ZsrC/+aLAZkME59qkI0mFYDLzKj4WqGjMoENULC/359orzgUKcmSuQq2RECbIdWXD X-Received: by 2002:a05:6402:703:b0:42d:d347:a586 with SMTP id w3-20020a056402070300b0042dd347a586mr64566123edx.316.1655103598029; Sun, 12 Jun 2022 23:59:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655103598; cv=none; d=google.com; s=arc-20160816; b=MBCGnZ9TCP9itiiwsmv3PK5ucUq7fVMN/RiSaFWO8cMjGPtO8kIXOW3Afqv8/YX27g wPRjMOCvz9J6gFn0QWuRvPIxuRW+BBvxniqzgztMdhTZIlrOP0fD9eLWxd9Jv3k+mN8d 7xkTg+tmUAtRwCZ1VqYiSrMogxlI2tIA0VIzDl0lkYfaaIsfgkrndUNjxZK8q+/G8u9Q O5d5xM1C4YDXgttYpali1EX/CV22uzHKOAOCPGdFl1qLOPEBXMUMMbm430FBO3/MG/lI EjrJoFwKbMN/AxAZThlNww9iOSj9A5U4fm/TAQrWsYgoA8Lj67w4bynY3hCihlbYkh1F OLBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=EBTJIanwJR50rLSVSc/pLJv6r5uahU7S6ReAo25yPME=; b=hX1awvfi61e2dcFxhx3PtN/z8/j6r7GASFm9tcEI9oElBY/9PvhWzs/KTOG6puRCax 5vlwa02UzYJ1wc5TFoTXKXEdSFHg+Fgk8j+gr7agOD0fp/WI0oMPvHfICSJKfgTM5TuH vValeDB9J6iHh9NtOZ/iDmo5b7Q+ycY+xPbRVfgawMAq4vqqPR4wRUff4NiIxWPRE9nk I0XPNiZpkQNk/QEup1vC0Y3+H/KGuybrWBymkHv5kQ3l3iuWwcksnloyMi4R5XzFnlRQ zt1CluEgqIqFt75np7Xrnwp8hG9V1moMp5nLYkpHbEjgBSshNZ98ZwZGmm5C9fRq63Oq FGtg== ARC-Authentication-Results: i=1; mx.google.com; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga19-20020a1709070c1300b00707e87fe126si8498885ejc.99.2022.06.12.23.59.32; Sun, 12 Jun 2022 23:59:58 -0700 (PDT) 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; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234885AbiFMGff (ORCPT + 99 others); Mon, 13 Jun 2022 02:35:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231917AbiFMGfa (ORCPT ); Mon, 13 Jun 2022 02:35:30 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6892BC81; Sun, 12 Jun 2022 23:35:27 -0700 (PDT) Received: from kwepemi500014.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LM1wp1jX5zgYXn; Mon, 13 Jun 2022 14:33:30 +0800 (CST) Received: from huawei.com (10.67.174.157) by kwepemi500014.china.huawei.com (7.221.188.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 13 Jun 2022 14:35:25 +0800 From: Li Zhengyu To: , CC: , , , , Subject: [PATCH] clk: qcom: clk-rpmh: Remove redundant if statement Date: Mon, 13 Jun 2022 14:33:27 +0800 Message-ID: <20220613063327.89320-1-lizhengyu3@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.174.157] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi500014.china.huawei.com (7.221.188.232) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 By the clk framework already reference counts prepare/unprepare, this if statement should be never true. Signed-off-by: Li Zhengyu --- Previous threads: https://lore.kernel.org/all/20220531094539.252642-1-lizhengyu3@huawei.com/ drivers/clk/qcom/clk-rpmh.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index aed907982344..249146947923 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -195,10 +195,6 @@ static int clk_rpmh_aggregate_state_send_command(struct clk_rpmh *c, { int ret; - /* Nothing required to be done if already off or on */ - if (enable == c->state) - return 0; - c->state = enable ? c->valid_state_mask : 0; c->aggr_state = c->state | c->peer->state; c->peer->aggr_state = c->aggr_state; -- 2.17.1