From: Luis Chamberlain <mcgrof@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Johannes Berg <johannes@sipsolutions.net>,
Linus Walleij <linus.walleij@linaro.org>,
Minchan Kim <minchan@kernel.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Namjae Jeon <linkinjeon@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Russ Weight <russell.h.weight@intel.com>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Steve French <sfrench@samba.org>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-cifs@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-mtd@lists.infradead.org, linux-rdma@vger.kernel.org,
linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
netdev@vger.kernel.org
Subject: Re: [PATCH] driver core: class: mark the struct class for sysfs callbacks as constant
Date: Mon, 27 Mar 2023 09:05:12 -0700 [thread overview]
Message-ID: <ZCG+uH4Dh16Gwonj@bombadil.infradead.org> (raw)
In-Reply-To: <20230325084537.3622280-1-gregkh@linuxfoundation.org>
On Sat, Mar 25, 2023 at 09:45:37AM +0100, Greg Kroah-Hartman wrote:
> struct class should never be modified in a sysfs callback as there is
> nothing in the structure to modify, and frankly, the structure is almost
> never used in a sysfs callback, so mark it as constant to allow struct
> class to be moved to read-only memory.
>
> While we are touching all class sysfs callbacks also mark the attribute
> as constant as it can not be modified. The bonding code still uses this
> structure so it can not be removed from the function callbacks.
>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Luis
prev parent reply other threads:[~2023-03-27 16:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-25 8:45 [PATCH] driver core: class: mark the struct class for sysfs callbacks as constant Greg Kroah-Hartman
2023-03-27 16:05 ` Luis Chamberlain [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZCG+uH4Dh16Gwonj@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=axboe@kernel.dk \
--cc=brgl@bgdev.pl \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linkinjeon@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=minchan@kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
--cc=russell.h.weight@intel.com \
--cc=senozhatsky@chromium.org \
--cc=sfrench@samba.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).