From: Alan Stern <stern@rowland.harvard.edu>
To: j.ne@posteo.net
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/9] usb: storage: Mark various arrays as const
Date: Wed, 26 Feb 2025 12:02:02 -0500 [thread overview]
Message-ID: <ea5c2735-cfb3-4e5f-a7f9-40d4493bd05a@rowland.harvard.edu> (raw)
In-Reply-To: <20250226-misc-const-v2-0-ab655a4a29cc@posteo.net>
On Wed, Feb 26, 2025 at 03:17:22PM +0100, 'Jonathan Neuschäfer via B4 Relay' via USB Mass Storage on Linux wrote:
> While reading code, I noticed that some arrays in USB mass storage
> drivers are declared static but not const, even though they are not
> modified. This patchset marks them const.
>
> All patches were compile-tested.
>
> Signed-off-by: Jonathan Neuschäfer <j.ne@posteo.net>
> ---
> Changes in v2:
> - Add new patches 2-9
> - Use consistent authorship information
> - Link to v1: https://lore.kernel.org/r/20250225-misc-const-v1-1-121ff3b86437@posteo.net
The patches themselves look good, but I still think you should explain
in the patch descriptions why declaring these arrays const is worth
doing.
Merely saying _what_ you are doing isn't good enough. We can tell what
a patch does just by reading it. What we can't always tell is _why_ you
would want to do it. That is what needs to be explained.
The explanation doesn't have to be terribly long or detailed, but you
should not omit it entirely.
Alan Stern
next prev parent reply other threads:[~2025-02-26 17:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 14:17 Jonathan Neuschäfer via B4 Relay
2025-02-26 14:17 ` [PATCH v2 1/9] usb: storage: jumpshot: Use const for constant arrays Jonathan Neuschäfer via B4 Relay
2025-02-26 14:17 ` [PATCH v2 2/9] usb: storage: transport: Use const for constant array Jonathan Neuschäfer via B4 Relay
2025-02-26 14:17 ` [PATCH v2 3/9] usb: storage: alauda: Use const for card ID array Jonathan Neuschäfer via B4 Relay
2025-02-26 14:17 ` [PATCH v2 4/9] usb: storage: datafab: Use const for constant arrays Jonathan Neuschäfer via B4 Relay
2025-02-26 14:17 ` [PATCH v2 5/9] usb: storage: initializers: Use const for constant array Jonathan Neuschäfer via B4 Relay
2025-02-26 14:17 ` [PATCH v2 6/9] usb: storage: realtek_cr: Use const for constant arrays Jonathan Neuschäfer via B4 Relay
2025-02-26 14:17 ` [PATCH v2 7/9] usb: storage: sddr09: " Jonathan Neuschäfer via B4 Relay
2025-02-26 14:17 ` [PATCH v2 8/9] usb: storage: sddr55: " Jonathan Neuschäfer via B4 Relay
2025-02-26 14:17 ` [PATCH v2 9/9] usb: storage: shuttle_usbat: Use const for constant array Jonathan Neuschäfer via B4 Relay
2025-02-26 17:02 ` Alan Stern [this message]
2025-02-26 17:43 ` [PATCH v2 0/9] usb: storage: Mark various arrays as const J. Neuschäfer
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=ea5c2735-cfb3-4e5f-a7f9-40d4493bd05a@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=gregkh@linuxfoundation.org \
--cc=j.ne@posteo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=usb-storage@lists.one-eyed-alien.net \
/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
all inboxes | Powered by JetHome®