Re: [RFC PATCH v2 09/17] mm/damon/sysfs: implement preps directory
[email protected] Sun, 26 Jul 2026 17:46:08 +0000
| Newsgroups | dev.linux.lists.damon |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The kobj_type structure `damon_sysfs_preps_ktype` is missing the `static` keyword. -- --- Patch [9]: [RFC PATCH v2 09/17] mm/damon/sysfs: implement preps directory --- commit 8155aac7530c47520c4a221fb588dbd6e53e3875 Author: SJ Park <[email protected]> mm/damon/sysfs: implement preps directory This commit implements a sysfs directory and a file for setting DAMON probe preps. It introduces the preparatory data structures and functions without actually generating the directories yet. > diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c > index 50ff1c172d746..bf65e87fcb521 100644 > --- a/mm/damon/sysfs.c > +++ b/mm/damon/sysfs.c [ ... ] > @@ -750,6 +750,74 @@ static const struct kobj_type damon_sysfs_intervals_ktype = { > .default_groups = damon_sysfs_intervals_groups, > }; > [ ... ] > +static struct attribute *damon_sysfs_preps_attrs[] = { > + &damon_sysfs_preps_nr_attr.attr, > + NULL, > +}; > +ATTRIBUTE_GROUPS(damon_sysfs_preps); > + > +const struct kobj_type damon_sysfs_preps_ktype = { [Severity: Low] Does this inadvertently expose damon_sysfs_preps_ktype to the global namespace? It looks like the static keyword is missing on the definition of damon_sysfs_preps_ktype, which will cause it to be globally visible and may trigger static analysis warnings. > + .release = damon_sysfs_preps_release, > + .sysfs_ops = &kobj_sysfs_ops, > + .default_groups = damon_sysfs_preps_groups, > +}; > + > /* > * filter directory > */ -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=9