Re: [RFC PATCH 11/17] mm/damon/sysfs: implement probe prep directory
SJ Park <[email protected]> Sat, 25 Jul 2026 14:59:21 -0700
| Newsgroups | dev.linux.lists.damon |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 25 Jul 2026 21:10:40 +0000 [email protected] wrote: > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: > - [Low] The static constant `damon_sysfs_prep_ktype` is defined but not used anywhere in the file. > -- > > --- Patch [11]: [RFC PATCH 11/17] mm/damon/sysfs: implement probe prep directory --- > commit a150eac865fe6562090f70dc8b3909c07dadeb09 > Author: SJ Park <[email protected]> > > mm/damon/sysfs: implement probe prep directory > > Implement DAMON sysfs directory and files for specifying each probe prep > action. Introduce only preparatory data structure and functions, without > wiring them up yet. > > > diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c > > index 38affef08d0fb..8f9a5df598c51 100644 > > --- a/mm/damon/sysfs.c > > +++ b/mm/damon/sysfs.c > > [ ... ] > > > +static struct attribute *damon_sysfs_prep_attrs[] = { > > + &damon_sysfs_prep_prep_action_attr.attr, > > + NULL, > > +}; > > +ATTRIBUTE_GROUPS(damon_sysfs_prep); > > + > > +static const struct kobj_type damon_sysfs_prep_ktype = { > > + .release = damon_sysfs_prep_release, > > + .sysfs_ops = &kobj_sysfs_ops, > > + .default_groups = damon_sysfs_prep_groups, > > +}; > > [Severity: Low] > Since this patch introduces preparatory data structures that are not yet > wired up, the static constant damon_sysfs_prep_ktype is defined but not > used anywhere in mm/damon/sysfs.c. > > Could this trigger a -Wunused-const-variable warning when building the > kernel with W=1? Good catch. I will fix in the next revision. > > -- > Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=11 Thanks, SJ