Messages in this thread |  | | From | Michael Kelley <> | | Subject | RE: [PATCH 1/4] drivers: hv: mark chan_attr_ring_buffer as const | | Date | Fri, 3 Apr 2026 02:52:57 +0000 |
| |
From: Thomas Weißschuh <linux@weissschuh.net> Sent: Thursday, April 2, 2026 8:18 AM > > The structure is never modified, mark it as const. > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > --- > drivers/hv/vmbus_drv.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c > index bc4fc1951ae1..5f9b7cc9080c 100644 > --- a/drivers/hv/vmbus_drv.c > +++ b/drivers/hv/vmbus_drv.c > @@ -1959,7 +1959,7 @@ static int hv_mmap_ring_buffer_wrapper(struct file *filp, > struct kobject *kobj, > return channel->mmap_ring_buffer(channel, vma); > } > > -static struct bin_attribute chan_attr_ring_buffer = { > +static const struct bin_attribute chan_attr_ring_buffer = { > .attr = { > .name = "ring", > .mode = 0600, > @@ -1985,7 +1985,7 @@ static struct attribute *vmbus_chan_attrs[] = { > NULL > }; > > -static const struct bin_attribute *vmbus_chan_bin_attrs[] = { > +static const struct bin_attribute *const vmbus_chan_bin_attrs[] = { > &chan_attr_ring_buffer, > NULL > }; > > -- > 2.53.0 >
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
|  |