mm/damon/core: hide core-private struct fields
Status from this message: [merged mm-stable] mm-damon-core-hide-core-private-damon_ctx-fields.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first
Changes from RFC v1 from the cover letter
- RFC v1: https://lore.kernel.org/[email protected]
- Drop RFC tag.
Patches in v1 All 10 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | mm/damon/core: hide private damon_region fieldsinclude/ | +4 | 0 replies | Applied |
| 2/10 | mm/damon/core: hide private damon_target fieldsinclude/ | +5 | 0 replies | Applied |
| 3/10 | mm/damon/core: hide private damos_quota_goal fieldsinclude/ | +6 | 0 replies | Applied |
| 4/10 | mm/damon/core: hide private damos_quota fieldsinclude/ | +4 | 0 replies | Applied |
| 5/10 | mm/damon/core: hide private damos_filter fieldsinclude/ | +2 | 0 replies | Applied |
| 6/10 | mm/damon/core: hide private damos fieldsinclude/ | +27 | 0 replies | Applied |
| 7/10 | mm/damon/core: hide private damon_filter fieldsinclude/ | +2 | 0 replies | Applied |
| 8/10 | mm/damon/core: hide private damon_probe fieldsinclude/ | +3 | 0 replies | Applied |
| 9/10 | mm/damon/sysfs: do not directly access damon_ctx->opsmm/ | +1 | 0 replies | Applied |
| 10/10 | mm/damon/core: hide core-private damon_ctx fieldsinclude/ | +8 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/10] mm/damon/core: hide core-private struct fields
DAMON core structs hide core-private fields using 'private:' comment tags. It is incomplete and inconsistent. The linked list heads in a few structs, for example, are intended to be hidden, and always be used using the wrapper macros like damon_for_each_region(). But those were mistakenly marked as non-private. A few core layer-only fields were also mistakenly added as non-private.
This only encourages callers to directly use the private fields. It is easy to make mistakes, and difficult to control. Mark all such DAMON core struct fields as private.
Patches 1-8 mark the private fields for damon_region, damon_target, damos_quota_goal, damos_quota, damos_filter, damos, damon_filter and damon_probe, respectively. Patch 9 removes DAMON_SYSFS's direct access to core-private field, damon_ctx->ops. Finally patch 10 mark the private fields for damon_ctx.
Changes from RFC v1
- RFC v1: https://lore.kernel.org/[email protected]
- Drop RFC tag.
SJ Park (10):
mm/damon/core: hide private damon_region fields mm/damon/core: hide private damon_target fields mm/damon/core: hide private damos_quota_goal fields mm/damon/core: hide private damos_quota fields mm/damon/core: hide private damos_filter fields mm/damon/core: hide private damos fields mm/damon/core: hide private damon_filter fields mm/damon/core: hide private damon_probe fields mm/damon/sysfs: do not directly access damon_ctx->ops mm/damon/core: hide core-private damon_ctx fields
include/linux/damon.h | 110 +++++++++++++++++++++++------------------- mm/damon/sysfs.c | 2 +- 2 files changed, 62 insertions(+), 50 deletions(-)
base-commit: 4c0f8c26ecc149f268b6c488e6cbde2a4e58160a
Signature · 1 line
2.47.3