lkml.org 
[lkml]   [2026]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 3/4] drivers: hv: mark bus attributes as const
Date
From: Thomas Weißschuh <linux@weissschuh.net> Sent: Thursday, April 2, 2026 8:18 AM
>
> This attribute 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 d41b39ab628d..ecce6b72a2a2 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -639,9 +639,9 @@ static ssize_t hibernation_show(const struct bus_type *bus, char *buf)
> return sprintf(buf, "%d\n", !!hv_is_hibernation_supported());
> }
>
> -static BUS_ATTR_RO(hibernation);
> +static const BUS_ATTR_RO(hibernation);
>
> -static struct attribute *vmbus_bus_attrs[] = {
> +static const struct attribute *const vmbus_bus_attrs[] = {
> &bus_attr_hibernation.attr,
> NULL,
> };
>
> --
> 2.53.0
>

Reviewed-by: Michael Kelley <mhklinux@outlook.com>

\
 
 \ /
  Last update: 2026-04-03 05:05    [W:0.101 / U:6.917 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog