[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mafs08qtv7yfu.fsf@kernel.org>
Date: Thu, 07 Nov 2024 17:20:37 +0000
From: Pratyush Yadav <pratyush@...nel.org>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, "Rafael J. Wysocki"
<rafael@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>, Srinivas
Kandagatla <srinivas.kandagatla@...aro.org>, Davidlohr Bueso
<dave@...olabs.net>, Jonathan Cameron <jonathan.cameron@...wei.com>,
Dave Jiang <dave.jiang@...el.com>, Alison Schofield
<alison.schofield@...el.com>, Vishal Verma <vishal.l.verma@...el.com>,
Ira Weiny <ira.weiny@...el.com>, Alex Deucher
<alexander.deucher@....com>, Christian König
<christian.koenig@....com>,
Xinhui Pan <Xinhui.Pan@....com>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>, Dennis Dalessandro
<dennis.dalessandro@...nelisnetworks.com>, Jason Gunthorpe
<jgg@...pe.ca>, Leon Romanovsky <leon@...nel.org>, Tudor Ambarus
<tudor.ambarus@...aro.org>, Pratyush Yadav <pratyush@...nel.org>,
Michael Walle <mwalle@...nel.org>, Miquel Raynal
<miquel.raynal@...tlin.com>, Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>, Naveen Krishna Chatradhi
<naveenkrishna.chatradhi@....com>, Carlos Bilbao
<carlos.bilbao.osdev@...il.com>, Hans de Goede <hdegoede@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>, "David E.
Box"
<david.e.box@...ux.intel.com>, "James E.J. Bottomley"
<James.Bottomley@...senPartnership.com>, "Martin K. Petersen"
<martin.petersen@...cle.com>, Richard Henderson
<richard.henderson@...aro.org>, Matt Turner <mattst88@...il.com>,
Frederic Barrat <fbarrat@...ux.ibm.com>, Andrew Donnellan
<ajd@...ux.ibm.com>, Arnd Bergmann <arnd@...db.de>, Logan Gunthorpe
<logang@...tatee.com>, "K. Y. Srinivasan" <kys@...rosoft.com>, Haiyang
Zhang <haiyangz@...rosoft.com>, Wei Liu <wei.liu@...nel.org>, Dexuan Cui
<decui@...rosoft.com>, Dan Williams <dan.j.williams@...el.com>,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
linux-cxl@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-rdma@...r.kernel.org,
linux-mtd@...ts.infradead.org, platform-driver-x86@...r.kernel.org,
linux-scsi@...r.kernel.org, linux-usb@...r.kernel.org,
linux-alpha@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-hyperv@...r.kernel.org
Subject: Re: [PATCH v2 05/10] sysfs: treewide: constify attribute callback
of bin_is_visible()
On Sun, Nov 03 2024, Thomas Weißschuh wrote:
> The is_bin_visible() callbacks should not modify the struct
> bin_attribute passed as argument.
> Enforce this by marking the argument as const.
>
> As there are not many callback implementers perform this change
> throughout the tree at once.
>
> Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
> ---
> diff --git a/drivers/mtd/spi-nor/sysfs.c b/drivers/mtd/spi-nor/sysfs.c
> index 96064e4babf01f6950c81586764386e7671cbf97..5e9eb268073d18e0a46089000f18a3200b4bf13d 100644
> --- a/drivers/mtd/spi-nor/sysfs.c
> +++ b/drivers/mtd/spi-nor/sysfs.c
> @@ -87,7 +87,7 @@ static umode_t spi_nor_sysfs_is_visible(struct kobject *kobj,
> }
>
> static umode_t spi_nor_sysfs_is_bin_visible(struct kobject *kobj,
> - struct bin_attribute *attr, int n)
> + const struct bin_attribute *attr, int n)
Acked-by: Pratyush Yadav <pratyush@...nel.org> # for spi-nor
> {
> struct spi_device *spi = to_spi_device(kobj_to_dev(kobj));
> struct spi_mem *spimem = spi_get_drvdata(spi);
--
Regards,
Pratyush Yadav
Powered by blists - more mailing lists