Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp23422874rwd; Sat, 1 Jul 2023 01:17:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6TuCK5bqKd5Zn16IBzrV6k9PwIp2ShPwY1tLLXp6YF1ZsqFrhlnWUfP4mDQyBFkmzrEvxW X-Received: by 2002:a05:6808:140d:b0:3a1:cbac:38e5 with SMTP id w13-20020a056808140d00b003a1cbac38e5mr6558056oiv.12.1688199435730; Sat, 01 Jul 2023 01:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688199435; cv=none; d=google.com; s=arc-20160816; b=n+O5VsMWyFT8dqAoX9g5S4XnexTh7lwRdQj1xZBQdIKVShtiSloBTA0Vl4h4Yilc8C IELwCWeDmKYYLcCg59zkTUxeMRWR8Mz++5A/4ekrZLIJwOfo0EtIV5JX0iG4yKGMWDw5 E1DnanrbJWAPuirlAIU/u7TvYt97b2dSJVTaHoPSJJ6McfHG6v1Xbv9rAunb4SBKM0VT DnSLwp9qj7ZKqx+7yhrSZsXoHzRyYbwXc7cvoBuLI26Xvvad37VuoHmOzzHAEvQO74cg aK2DdnCa/eRujCsL+v8EE3d87Nx89frZRL6vxA0QLEZ6SBCWjvFS6Xui8txvdVzg6c5q XPBw== 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 :message-id:date:subject:cc:to:from; bh=VYaot9a6LTC4ap0a0DDTSfvsDq/vrJkA8HTxWBCJTh4=; fh=/oR+NcEnzekdk9My/33KlMJIJsUMb/9hQpen5cpkHSY=; b=ocEkXINzTbhNJ7CUvBe5lOrkIe0fAosKVIHyvuNqcBtZAqBN/YPsHbz1a6PLBJtZ5E 2bSKS79i6/72X6/zK8cNdA8VQ4cordQaOnSASl/KezA4S2/u3b8lpeflgJvwwrZ6JOPv aF6JeOI8NBiRrvrkNshYHPz+6o+FiC1IStYKH/Fb+E67kWeznj6Vpy0CfpnWC0KR72hW KFycwNKfBiVRHq1CKKwg8BQ6+KsydYOOyWysYUZnx8Uuf4klXe9cL/tWWQBHOvDONK2g Ru976e6e6fPacLGO9L31u3NWwtpHmJGtCyAJWzNJoyqaq7fS2I0oEIw6QJkRvaIu//Kx yhsw== 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 26-20020a63115a000000b0055ace8caef7si11814660pgr.610.2023.07.01.01.17.01; Sat, 01 Jul 2023 01:17:15 -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 S229612AbjGAHik (ORCPT + 99 others); Sat, 1 Jul 2023 03:38:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbjGAHih (ORCPT ); Sat, 1 Jul 2023 03:38:37 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCA11199; Sat, 1 Jul 2023 00:38:34 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QtPCx4LL3zTknD; Sat, 1 Jul 2023 15:37:33 +0800 (CST) Received: from huawei.com (10.174.151.185) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Sat, 1 Jul 2023 15:38:29 +0800 From: Miaohe Lin To: , , CC: , , Subject: [PATCH] cgroup: remove unneeded return value of cgroup_rm_cftypes_locked() Date: Sat, 1 Jul 2023 15:38:56 +0800 Message-ID: <20230701073856.2095425-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 The return value of cgroup_rm_cftypes_locked() is always 0. So remove it to simplify the code. No functional change intended. Signed-off-by: Miaohe Lin --- kernel/cgroup/cgroup.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index bfe3cd8ccf36..b0d98542eea2 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -4320,14 +4320,13 @@ static int cgroup_init_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) return ret; } -static int cgroup_rm_cftypes_locked(struct cftype *cfts) +static void cgroup_rm_cftypes_locked(struct cftype *cfts) { lockdep_assert_held(&cgroup_mutex); list_del(&cfts->node); cgroup_apply_cftypes(cfts, false); cgroup_exit_cftypes(cfts); - return 0; } /** @@ -4343,8 +4342,6 @@ static int cgroup_rm_cftypes_locked(struct cftype *cfts) */ int cgroup_rm_cftypes(struct cftype *cfts) { - int ret; - if (!cfts || cfts[0].name[0] == '\0') return 0; @@ -4352,9 +4349,9 @@ int cgroup_rm_cftypes(struct cftype *cfts) return -ENOENT; cgroup_lock(); - ret = cgroup_rm_cftypes_locked(cfts); + cgroup_rm_cftypes_locked(cfts); cgroup_unlock(); - return ret; + return 0; } /** -- 2.33.0