Skip to content

usb: storage: Mark various arrays as const

Jonathan Neuschäfer b4-sent linux-usb lkml 3 versions – In review

Get series with b4
b4 am [email protected] change-id 20240401-misc-const-e7b4cf20d5f9

Versions newest first

  1. v3 Latest9 patches 1 replyIn review
  2. v29 patches 2 repliesSuperseded
  3. v11 patch 2 repliesSuperseded

Changes in v3 from the cover letter

- Elaborate *why* const is a good idea
- Link to v2: https://lore.kernel.org/r/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9usb: storage: jumpshot: Use const for constant arraysdrivers/usb/storage/jumpshot.c+5 -50 replies
2/9usb: storage: transport: Use const for constant arraydrivers/usb/storage/transport.c+1 -10 replies
3/9usb: storage: alauda: Use const for card ID arraydrivers/usb/storage/alauda.c+4 -40 replies
4/9usb: storage: datafab: Use const for constant arraysdrivers/usb/storage/datafab.c+7 -70 replies
5/9usb: storage: initializers: Use const for constant arraydrivers/usb/storage/initializers.c+1 -10 replies
6/9usb: storage: realtek_cr: Use const for constant arraysdrivers/usb/storage/realtek_cr.c+3 -30 replies
7/9usb: storage: sddr09: Use const for constant arraysdrivers/usb/storage/sddr09.c+7 -70 replies
8/9usb: storage: sddr55: Use const for constant arraysdrivers/usb/storage/sddr55.c+2 -20 replies
9/9usb: storage: shuttle_usbat: Use const for constant arraydrivers/usb/storage/shuttle_usbat.c+1 -10 replies

Reviews trailers per patch

None of the 9 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAlan Stern
SeriesR-b
1/9
2/9
3/9
4/9
5/9
6/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/9] usb: storage: Mark various arrays as const

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.

---
Changes in v3:
- Elaborate *why* const is a good idea
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Add new patches 2-9
- Use consistent authorship information
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Jonathan Neuschäfer (9):
usb: storage: jumpshot: Use const for constant arrays
usb: storage: transport: Use const for constant array
usb: storage: alauda: Use const for card ID array
usb: storage: datafab: Use const for constant arrays
usb: storage: initializers: Use const for constant array
usb: storage: realtek_cr: Use const for constant arrays
usb: storage: sddr09: Use const for constant arrays
usb: storage: sddr55: Use const for constant arrays
usb: storage: shuttle_usbat: Use const for constant array

 drivers/usb/storage/alauda.c        |  8 ++++----
 drivers/usb/storage/datafab.c       | 14 +++++++-------
 drivers/usb/storage/initializers.c  |  2 +-
 drivers/usb/storage/jumpshot.c      | 10 +++++-----
 drivers/usb/storage/realtek_cr.c    |  6 +++---
 drivers/usb/storage/sddr09.c        | 14 +++++++-------
 drivers/usb/storage/sddr55.c        |  4 ++--
 drivers/usb/storage/shuttle_usbat.c |  2 +-
 drivers/usb/storage/transport.c     |  2 +-
 9 files changed, 31 insertions(+), 31 deletions(-)

---
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
change-id: 20240401-misc-const-e7b4cf20d5f9

Best regards,

Signature · 1 line
Jonathan Neuschäfer <[email protected]>