Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cgroup/misc: Remove unused misc_cg_res_total_usage

misc_cg_res_total_usage() was added in 2021 by
commit a72232eabdfc ("cgroup: Add misc cgroup controller")

but has remained unused.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Acked-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Dr. David Alan Gilbert and committed by
Tejun Heo
ad6c08d8 dae68fba

-22
-6
include/linux/misc_cgroup.h
··· 60 60 struct misc_res res[MISC_CG_RES_TYPES]; 61 61 }; 62 62 63 - u64 misc_cg_res_total_usage(enum misc_res_type type); 64 63 int misc_cg_set_capacity(enum misc_res_type type, u64 capacity); 65 64 int misc_cg_try_charge(enum misc_res_type type, struct misc_cg *cg, u64 amount); 66 65 void misc_cg_uncharge(enum misc_res_type type, struct misc_cg *cg, u64 amount); ··· 102 103 } 103 104 104 105 #else /* !CONFIG_CGROUP_MISC */ 105 - 106 - static inline u64 misc_cg_res_total_usage(enum misc_res_type type) 107 - { 108 - return 0; 109 - } 110 106 111 107 static inline int misc_cg_set_capacity(enum misc_res_type type, u64 capacity) 112 108 {
-16
kernel/cgroup/misc.c
··· 68 68 } 69 69 70 70 /** 71 - * misc_cg_res_total_usage() - Get the current total usage of the resource. 72 - * @type: misc res type. 73 - * 74 - * Context: Any context. 75 - * Return: Current total usage of the resource. 76 - */ 77 - u64 misc_cg_res_total_usage(enum misc_res_type type) 78 - { 79 - if (valid_type(type)) 80 - return atomic64_read(&root_cg.res[type].usage); 81 - 82 - return 0; 83 - } 84 - EXPORT_SYMBOL_GPL(misc_cg_res_total_usage); 85 - 86 - /** 87 71 * misc_cg_set_capacity() - Set the capacity of the misc cgroup res. 88 72 * @type: Type of the misc res. 89 73 * @capacity: Supported capacity of the misc res on the host.