From: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
Subject: [PATCH] scsi: mpi3mr: Replace one-element arrays with flexible-array members
Date: Thu, 4 Sep 2025 22:43:45 -0300 [thread overview]
Message-ID: <20250905014345.7054-1-pedrodemargomes@gmail.com> (raw)
One-element arrays are deprecated, and we are replacing them with flexible
array members instead. So, replace one-element arrays with flexible-array
members in multiple structures.
Signed-off-by: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
---
include/uapi/scsi/scsi_bsg_mpi3mr.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/uapi/scsi/scsi_bsg_mpi3mr.h b/include/uapi/scsi/scsi_bsg_mpi3mr.h
index f5ea1db92339..9e5b6ced53ab 100644
--- a/include/uapi/scsi/scsi_bsg_mpi3mr.h
+++ b/include/uapi/scsi/scsi_bsg_mpi3mr.h
@@ -205,7 +205,7 @@ struct mpi3mr_all_tgt_info {
__u16 num_devices;
__u16 rsvd1;
__u32 rsvd2;
- struct mpi3mr_device_map_info dmi[1];
+ struct mpi3mr_device_map_info dmi[];
};
/**
@@ -248,7 +248,7 @@ struct mpi3mr_logdata_entry {
__u8 valid_entry;
__u8 rsvd1;
__u16 rsvd2;
- __u8 data[1]; /* Variable length Array */
+ __u8 data[]; /* Variable length Array */
};
/**
@@ -259,7 +259,7 @@ struct mpi3mr_logdata_entry {
* @entry: Variable length Log data entry array
*/
struct mpi3mr_bsg_in_log_data {
- struct mpi3mr_logdata_entry entry[1];
+ __DECLARE_FLEX_ARRAY(struct mpi3mr_logdata_entry, entry);
};
/**
@@ -307,7 +307,7 @@ struct mpi3mr_bsg_in_hdb_status {
__u8 element_trigger_format;
__u16 rsvd2;
__u32 rsvd3;
- struct mpi3mr_hdb_entry entry[1];
+ struct mpi3mr_hdb_entry entry[];
};
/**
@@ -416,7 +416,7 @@ struct mpi3mr_buf_entry_list {
__u8 rsvd1;
__u16 rsvd2;
__u32 rsvd3;
- struct mpi3mr_buf_entry buf_entry[1];
+ struct mpi3mr_buf_entry buf_entry[];
};
/**
* struct mpi3mr_bsg_mptcmd - Generic bsg data
--
2.39.5
next reply other threads:[~2025-09-05 1:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-05 1:43 Pedro Demarchi Gomes [this message]
2025-09-05 16:47 ` Christophe JAILLET
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=20250905014345.7054-1-pedrodemargomes@gmail.com \
--to=pedrodemargomes@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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
all inboxes | Powered by JetHome®