]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched_ext: Use sizeof_field for key_len in dsq_hash_params
authorLiang Jie <liangjie@lixiang.com>
Fri, 13 Dec 2024 09:52:54 +0000 (17:52 +0800)
committerTejun Heo <tj@kernel.org>
Fri, 13 Dec 2024 16:51:19 +0000 (06:51 -1000)
commite197f5ec3ad38ad0a014ed1ba672497bdf0550bb
tree3fb9412a7740e8e766fb4a0160e96c014c89ecac
parent8da7bf2cee2735dbd2478cf07672ff0d243ce6ed
sched_ext: Use sizeof_field for key_len in dsq_hash_params

Update the `dsq_hash_params` initialization to use `sizeof_field`
for the `key_len` field instead of a hardcoded value.

This improves code readability and ensures the key length dynamically
matches the size of the `id` field in the `scx_dispatch_q` structure.

Signed-off-by: Liang Jie <liangjie@lixiang.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c