Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp4538045ioo; Tue, 31 May 2022 06:39:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvdzNPoIGAOp/JpsBkNtB5deEwCYlvW7jKyqNc6VrYCMjDDxZOLWAGBCFR+511aJQfEwgv X-Received: by 2002:a63:1343:0:b0:3fb:bddd:a3ea with SMTP id 3-20020a631343000000b003fbbddda3eamr16500483pgt.403.1654004380448; Tue, 31 May 2022 06:39:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654004380; cv=none; d=google.com; s=arc-20160816; b=mKYE45wsLDumFnJhHdcscv1dOlbQGcxp26FTlUiCWFt1KqMgH/NeuZnm0VuQedakVH QM7dpW9nL6umTTiGPc1JeL1EtEz8In6Hcu78BjWv7Iz6G8LeNtq4C8J/vTkJMipH8uj1 BDDRbsvoMUUmy96DNiF/jj/gkibGuBsMd2iAKiCky5Lh5xdB6x14o0ZoO8XCjLWOL5wZ ujqT8HtM/GE3Bdd5GBR9h0Z4+s96yHmIFwmIV80Nxh1gDgwc4/rBFW/dzGjHKwlEZa5y simQxzMLpy3+XqXUJUSb/BquVeU6CKUe1bZ1si5boWIA5ZLjp2bY5N41UfnuutUhFX3o YI4Q== 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=jC83EE5PpPS+s+ff+WFJRTcJHzd2fkeAKxr9arWK4qk=; b=TUc217QpYE5Ocimgu9tiFZP7TkBUUklIg/ESyLiWG1Qtb6zDTprxne7zLk3svA/3pG Uj+XIrJctwtvdPznjywVq5Cm9a7SJbnwinl2I1TVqB0EDtpAAVq6ZRWD4NKAxcmcePG+ PFHu28V4/PruXeX9anis2Wj/BXcqP6KWDapbTUGK+EzXdfD515HAtbxyHnvoCtyJsTvv nnZuTU+7JyPIWiFIaJ0kWhgweX85lHmEdKQKZ0dSCenrxfElyGp9CpVDUofhxGk6ZrLw XYXW68SFIwl4AQuyP5r9If4n4nd8Ov0jCMUcT7tzrajJFsfktzRPqSuF2c1FrFIwEy19 N9wQ== 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 bi11-20020a170902bf0b00b0015e8daafcb0si16023781plb.239.2022.05.31.06.39.22; Tue, 31 May 2022 06:39:40 -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 S245026AbiEaI6C (ORCPT + 99 others); Tue, 31 May 2022 04:58:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233830AbiEaI6A (ORCPT ); Tue, 31 May 2022 04:58:00 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80BC4BC36; Tue, 31 May 2022 01:57:57 -0700 (PDT) Received: from kwepemi500014.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LC5jY037SzgYTF; Tue, 31 May 2022 16:56:16 +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; Tue, 31 May 2022 16:57:55 +0800 From: Li Zhengyu To: CC: , , , , , , Subject: [PATCH] clk: qcom: clk-rpmh: Remove redundant if statement Date: Tue, 31 May 2022 16:56:11 +0800 Message-ID: <20220531085611.122884-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: dggems706-chm.china.huawei.com (10.3.19.183) 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 (!ret) has been checked, so remove (ret). Signed-off-by: Li Zhengyu --- drivers/clk/qcom/clk-rpmh.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index aed907982344..6d207f7e943d 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -207,10 +207,7 @@ static int clk_rpmh_aggregate_state_send_command(struct clk_rpmh *c, if (!ret) return 0; - if (ret && enable) - c->state = 0; - else if (ret) - c->state = c->valid_state_mask; + c->state = enable ? 0 : c->valid_state_mask; WARN(1, "clk: %s failed to %s\n", c->res_name, enable ? "enable" : "disable"); -- 2.17.1