Re: [PATCH v5 23/27] scsi: sd: add multipath disk attr groups
John Garry <[email protected]>
| Newsgroups | org.kernel.vger.linux-scsi,dev.linux.lists.sashiko-reviews |
|---|---|
| Organization | Oracle Corporation |
| Message-ID | <[email protected]> |
On 27/07/2026 16:20, [email protected] wrote: > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: > - [Medium] The newly defined multipath disk attribute groups are completely unreferenced and never hooked up to the multipath structures, rendering the feature inactive. > -- > > --- Patch [23]: [PATCH v5 23/27] scsi: sd: add multipath disk attr groups --- > commit 54820f0d02e2f6d8f0530b7358f2376bde300894 > Author: John Garry <[email protected]> > > scsi: sd: add multipath disk attr groups > > This commit adds sysfs attribute groups for multipath disks in the SCSI > subsystem. It defines attributes for delayed disk removal and includes > everything from the existing mpath attribute group. > >> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c >> index 242a15bc2c5bb..36c745cbb2619 100644 >> --- a/drivers/scsi/sd.c >> +++ b/drivers/scsi/sd.c > > [ ... ] > >> +static const struct attribute_group sd_mpath_disk_attr_group = { >> + .attrs = sd_mpath_disk_attrs, >> +}; >> + >> +__maybe_unused >> +static const struct attribute_group *sd_mpath_disk_attr_groups[] = { >> + &sd_mpath_disk_attr_group, >> + &mpath_attr_group, >> + NULL >> +}; > > [Severity: Medium] > Are these newly defined multipath disk attribute groups missing a registration > step? they are referenced later > > They are defined here and explicitly marked with __maybe_unused, but do not > appear to be assigned to any registration structure or hooked up to the active > multipath structures. Does this leave the new feature inactive and the > attributes unexposed to userspace? > >> + >> /** >> * sd_probe - called during driver initialization and whenever a >> * new scsi device is attached to the system. It is called once >