diff options
| author | Joel Granados <joel.granados@kernel.org> | 2026-06-25 22:38:14 +0200 |
|---|---|---|
| committer | Joel Granados <joel.granados@kernel.org> | 2026-08-05 15:28:23 +0200 |
| commit | b96b5c6708eae2720053b50af4e9ef3d83a40a94 (patch) | |
| tree | c8907603b396b5a661e35214f1b939dafd86b889 /tools/perf/scripts/python | |
| parent | 0ec31e033f020dc83728b2c1dc1de9b3a4902eaa (diff) | |
sysctl: Replace do_proc_do{int,ulong,uint}vec with do_proc_vec
Make do_proc_vec static and parametrize by proc_vec_type enum which
defines the type being processed and selects which converter is "live".
Signed-ness and size are calculated based on proc_vec_type and
table->data is now walked as raw bytes and advanced by the element size;
the converter still performs the actual typed load/store. Pass converter
as a union to avoid a cast from void*. The public
proc_do{int,uint,ulong}vec_conv() prototypes and all converter
signatures in kernel/, fs/ and the header are therefore unchanged.
Remove do_proc_doulongvec_minmax. proc_doulongvec_minmax_conv uses a
converter callback passed by the caller instead of conversions based on
conv{mul,div}. Create uni and bi-direction converters for milliseconds
to jiffies in proc_doulongvec_ms_jiffies_minmax; which is the only user
of proc_doulongvec_minmax_conv.
Replace do_proc_douintvec{,_w,_r} functions with a call to do_proc_vec.
Disallow vectors for uint by returning -EINVAL when more than one
element is detected.
Signed-off-by: Joel Granados <joel.granados@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
