aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorZijun Hu <quic_zijuhu@quicinc.com>2024-08-22 20:38:35 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-09-03 13:00:20 +0200
commita169a663bfa8198f33a5c1002634cc89e5128025 (patch)
tree76de79d2033b5b41e1e05d534ede684a8bdb340c /tools/perf/scripts/python/export-to-postgresql.py
parent4a74f22386ccb1ddd06eb242bdd02548a7199bda (diff)
driver core: class: Check namespace relevant parameters in class_register()
Device class has two namespace relevant fields which are usually associated by the following usage: struct class { ... const struct kobj_ns_type_operations *ns_type; const void *(*namespace)(const struct device *dev); ... } if (dev->class && dev->class->ns_type) dev->class->namespace(dev); (1) The usage looks weird since it checks @ns_type but calls namespace() (2) The usage implies both fields have dependency but their dependency is not currently enforced yet. It is found for all existing class definitions that the other filed is also assigned once one is assigned in current kernel tree. Fixed by enforcing above existing dependency that both fields are required for a device class to support namespace via parameter checks. Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20240822-class_fix-v1-1-2a6d38ba913a@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions