<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/message/fusion/lsi, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-08-03T01:32:52+00:00</updated>
<entry>
<title>scsi: message: fusion: struct _CONFIG_PAGE_IOC_4: Replace 1-element array with flexible array</title>
<updated>2024-08-03T01:32:52+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2024-07-11T17:28:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f296cc1d7f5aeccd0d87ec167e0aea05acb8a022'/>
<id>urn:sha1:f296cc1d7f5aeccd0d87ec167e0aea05acb8a022</id>
<content type='text'>
Replace the deprecated[1] use of a 1-element array in struct
_CONFIG_PAGE_IOC_4 with a modern flexible array.

Additionally add __counted_by annotation since SEP is only ever accessed
after updating ACtiveSEP:

lsi/mpi_cnfg.h:    IOC_4_SEP                   SEP[] __counted_by(ActiveSEP);  /* 08h */
mptsas.c:        ii = IOCPage4Ptr-&gt;ActiveSEP++;
mptsas.c:        IOCPage4Ptr-&gt;SEP[ii].SEPTargetID = id;
mptsas.c:        IOCPage4Ptr-&gt;SEP[ii].SEPBus = channel;

No binary differences are present after this conversion.

Link: https://github.com/KSPP/linux/issues/79 [1]
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
Link: https://lore.kernel.org/r/20240711172821.123936-6-kees@kernel.org
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: message: fusion: struct _CONFIG_PAGE_IOC_3: Replace 1-element array with flexible array</title>
<updated>2024-08-03T01:32:52+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2024-07-11T17:28:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=70631322dbab5b48f49f142dd9aef768c0fb077c'/>
<id>urn:sha1:70631322dbab5b48f49f142dd9aef768c0fb077c</id>
<content type='text'>
Replace the deprecated[1] use of a 1-element array in struct
_CONFIG_PAGE_IOC_3 with a modern flexible array.

Additionally add __counted_by annotation since PhysDisk is only ever
accessed via a loops bounded by NumPhysDisks:

lsi/mpi_cnfg.h:    IOC_3_PHYS_DISK             PhysDisk[] __counted_by(NumPhysDisks); /* 08h */
mptscsih.c:	for (i = 0; i &lt; ioc-&gt;raid_data.pIocPg3-&gt;NumPhysDisks; i++) {
mptscsih.c:		if ((id == ioc-&gt;raid_data.pIocPg3-&gt;PhysDisk[i].PhysDiskID) &amp;&amp;
mptscsih.c:		    (channel == ioc-&gt;raid_data.pIocPg3-&gt;PhysDisk[i].PhysDiskBus)) {
mptscsih.c:	for (i = 0; i &lt; ioc-&gt;raid_data.pIocPg3-&gt;NumPhysDisks; i++) {
mptscsih.c:		    ioc-&gt;raid_data.pIocPg3-&gt;PhysDisk[i].PhysDiskNum);
mptscsih.c:		    ioc-&gt;raid_data.pIocPg3-&gt;PhysDisk[i].PhysDiskNum,
mptscsih.c:	for (i = 0; i &lt; ioc-&gt;raid_data.pIocPg3-&gt;NumPhysDisks; i++) {
mptscsih.c:		if ((id == ioc-&gt;raid_data.pIocPg3-&gt;PhysDisk[i].PhysDiskID) &amp;&amp;
mptscsih.c:		    (channel == ioc-&gt;raid_data.pIocPg3-&gt;PhysDisk[i].PhysDiskBus)) {
mptscsih.c:			rc = ioc-&gt;raid_data.pIocPg3-&gt;PhysDisk[i].PhysDiskNum;
mptscsih.c:	for (i = 0; i &lt; ioc-&gt;raid_data.pIocPg3-&gt;NumPhysDisks; i++) {
mptscsih.c:		    ioc-&gt;raid_data.pIocPg3-&gt;PhysDisk[i].PhysDiskNum);
mptscsih.c:		    ioc-&gt;raid_data.pIocPg3-&gt;PhysDisk[i].PhysDiskNum,

No binary differences are present after this conversion.

Link: https://github.com/KSPP/linux/issues/79 [1]
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
Link: https://lore.kernel.org/r/20240711172821.123936-5-kees@kernel.org
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: message: fusion: struct _CONFIG_PAGE_IOC_2: Replace 1-element array with flexible array</title>
<updated>2024-08-03T01:32:52+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2024-07-11T17:28:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de80fe29ab53dc9efde5c773fadebd3e547ad785'/>
<id>urn:sha1:de80fe29ab53dc9efde5c773fadebd3e547ad785</id>
<content type='text'>
Replace the deprecated[1] use of a 1-element array in struct
_CONFIG_PAGE_IOC_2 with a modern flexible array.

Additionally add __counted_by annotation since RaidVolume is only ever
accessed from loops controlled by NumActiveVolumes:

lsi/mpi_cnfg.h:    CONFIG_PAGE_IOC_2_RAID_VOL  RaidVolume[] __counted_by(NumActiveVolumes); /* 0Ch */
mptbase.c:      for (i = 0; i &lt; pIoc2-&gt;NumActiveVolumes ; i++)
mptbase.c:                  pIoc2-&gt;RaidVolume[i].VolumeBus,
mptbase.c:                  pIoc2-&gt;RaidVolume[i].VolumeID);
mptsas.c:               for (i = 0; i &lt; ioc-&gt;raid_data.pIocPg2-&gt;NumActiveVolumes; i++) {
mptsas.c:                                       RaidVolume[i].VolumeID) {
mptsas.c:                                       RaidVolume[i].VolumeBus;
mptsas.c:       for (i = 0; i &lt; ioc-&gt;raid_data.pIocPg2-&gt;NumActiveVolumes; i++) {
mptsas.c:                   ioc-&gt;raid_data.pIocPg2-&gt;RaidVolume[i].VolumeID, 0);
mptsas.c:                   ioc-&gt;raid_data.pIocPg2-&gt;RaidVolume[i].VolumeID);
mptsas.c:                   ioc-&gt;raid_data.pIocPg2-&gt;RaidVolume[i].VolumeID, 0);
mptsas.c:               for (i = 0; i &lt; ioc-&gt;raid_data.pIocPg2-&gt;NumActiveVolumes; i++) {
mptsas.c:                       if (ioc-&gt;raid_data.pIocPg2-&gt;RaidVolume[i].VolumeID ==
mptsas.c:       for (i = 0; i &lt; ioc-&gt;raid_data.pIocPg2-&gt;NumActiveVolumes; i++)
mptsas.c:               if (ioc-&gt;raid_data.pIocPg2-&gt;RaidVolume[i].VolumeID == id)
mptspi.c:       for (i=0; i &lt; ioc-&gt;raid_data.pIocPg2-&gt;NumActiveVolumes; i++) {
mptspi.c:               if (ioc-&gt;raid_data.pIocPg2-&gt;RaidVolume[i].VolumeID == id) {

No binary differences are present after this conversion.

Link: https://github.com/KSPP/linux/issues/79 [1]
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
Link: https://lore.kernel.org/r/20240711172821.123936-4-kees@kernel.org
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: message: fusion: struct _CONFIG_PAGE_RAID_PHYS_DISK_1: Replace 1-element array with flexible array</title>
<updated>2024-08-03T01:32:52+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2024-07-11T17:28:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dc8932fbf6a9cad4cf6dd312d115a26d90facb7e'/>
<id>urn:sha1:dc8932fbf6a9cad4cf6dd312d115a26d90facb7e</id>
<content type='text'>
Replace the deprecated[1] use of a 1-element array in struct
_CONFIG_PAGE_RAID_PHYS_DISK_1 with a modern flexible array.

Additionally add __counted_by annotation since Path is only ever accessed
via a loops bounded by NumPhysDiskPaths:

lsi/mpi_cnfg.h:    RAID_PHYS_DISK1_PATH            Path[] __counted_by(NumPhysDiskPaths);/* 0Ch */
mptbase.c:      phys_disk-&gt;NumPhysDiskPaths = buffer-&gt;NumPhysDiskPaths;
mptbase.c:      for (i = 0; i &lt; phys_disk-&gt;NumPhysDiskPaths; i++) {
mptbase.c:              phys_disk-&gt;Path[i].PhysDiskID = buffer-&gt;Path[i].PhysDiskID;
mptbase.c:              phys_disk-&gt;Path[i].PhysDiskBus = buffer-&gt;Path[i].PhysDiskBus;

No binary differences are present after this conversion.

Link: https://github.com/KSPP/linux/issues/79 [1]
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
Link: https://lore.kernel.org/r/20240711172821.123936-3-kees@kernel.org
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: message: fusion: struct _CONFIG_PAGE_SAS_IO_UNIT_0: Replace 1-element array with flexible array</title>
<updated>2024-08-03T01:32:52+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2024-07-11T17:28:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=14c1f88c7f625dc12fb4a6f18154bcd6f7cd021f'/>
<id>urn:sha1:14c1f88c7f625dc12fb4a6f18154bcd6f7cd021f</id>
<content type='text'>
Replace the deprecated[1] use of a 1-element array in struct
_CONFIG_PAGE_SAS_IO_UNIT_0 with a modern flexible array.

Additionally add __counted_by annotation since PhyData is only ever
accessed via a loops bounded by NumPhys:

lsi/mpi_cnfg.h:    MPI_SAS_IO_UNIT0_PHY_DATA       PhyData[] __counted_by(NumPhys);    /* 10h */
mptsas.c:       port_info-&gt;num_phys = buffer-&gt;NumPhys;
mptsas.c:       for (i = 0; i &lt; port_info-&gt;num_phys; i++) {
mptsas.c:               mptsas_print_phy_data(ioc, &amp;buffer-&gt;PhyData[i]);
mptsas.c:               port_info-&gt;phy_info[i].phy_id = i;
mptsas.c:               port_info-&gt;phy_info[i].port_id =
mptsas.c:                   buffer-&gt;PhyData[i].Port;
mptsas.c:               port_info-&gt;phy_info[i].negotiated_link_rate =
mptsas.c:                   buffer-&gt;PhyData[i].NegotiatedLinkRate;

No binary differences are present after this conversion.

Link: https://github.com/KSPP/linux/issues/79 [1]
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
Link: https://lore.kernel.org/r/20240711172821.123936-2-kees@kernel.org
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: message: fusion: struct _RAID_VOL0_SETTINGS: Replace 1-element array with flexible array</title>
<updated>2024-08-03T01:32:52+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2024-07-11T17:28:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e76c9c9dd117c95c0ae248a217197228000912c'/>
<id>urn:sha1:8e76c9c9dd117c95c0ae248a217197228000912c</id>
<content type='text'>
Replace the deprecated[1] use of a 1-element array in struct
_RAID_VOL0_SETTINGS with a modern flexible array.

Additionally add __counted_by annotation since PhysDisk is only ever
accessed via a loops bounded by NumPhysDisks:

lsi/mpi_cnfg.h:    RAID_VOL0_PHYS_DISK     PhysDisk[] __counted_by(NumPhysDisks); /* 28h */
mptbase.c:	for (i = 0; i &lt; buffer-&gt;NumPhysDisks; i++) {
mptbase.c:		    buffer-&gt;PhysDisk[i].PhysDiskNum, &amp;phys_disk) != 0)
mptsas.c:	for (i = 0; i &lt; buffer-&gt;NumPhysDisks; i++) {
mptsas.c:		    buffer-&gt;PhysDisk[i].PhysDiskNum, &amp;phys_disk) != 0)
mptsas.c:	for (i = 0; i &lt; buffer-&gt;NumPhysDisks; i++) {
mptsas.c:		    buffer-&gt;PhysDisk[i].PhysDiskNum, &amp;phys_disk) != 0)

No binary differences are present after this conversion.

Link: https://github.com/KSPP/linux/issues/79 [1]
Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
Link: https://lore.kernel.org/r/20240711172821.123936-1-kees@kernel.org
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: message: mptlan: Replace one-element array with flexible-array member</title>
<updated>2021-04-02T03:03:10+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2021-03-24T23:33:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4e2e619f3c9e3c49859f085995554a53e9fc0e02'/>
<id>urn:sha1:4e2e619f3c9e3c49859f085995554a53e9fc0e02</id>
<content type='text'>
There is a regular need in the kernel to provide a way to declare having a
dynamically sized set of trailing elements in a structure. Kernel code
should always use "flexible array members"[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].

Refactor the code according to the use of a flexible-array member in struct
_SGE_TRANSACTION32 instead of one-element array.

Also, this helps with the ongoing efforts to enable -Warray-bounds by
fixing the following warning:

  CC [M]  drivers/message/fusion/mptlan.o
drivers/message/fusion/mptlan.c: In function ‘mpt_lan_sdu_send’:
drivers/message/fusion/mptlan.c:759:28: warning: array subscript 1 is above array bounds of ‘U32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds]
  759 |  pTrans-&gt;TransactionDetails[1] = cpu_to_le32((mac[2] &lt;&lt; 24) |
      |  ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/109
Link: https://lore.kernel.org/r/20210324233344.GA99059@embeddedor
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: message: fusion: Replace one-element array with flexible-array member</title>
<updated>2021-04-02T03:03:00+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2021-03-24T23:00:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ed46ccc7fe7612eb3763346dc0389d8206f071ef'/>
<id>urn:sha1:ed46ccc7fe7612eb3763346dc0389d8206f071ef</id>
<content type='text'>
There is a regular need in the kernel to provide a way to declare having a
dynamically sized set of trailing elements in a structure. Kernel code
should always use "flexible array members"[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].

Also, this helps with the ongoing efforts to enable -Warray-bounds by
fixing the following warning:

drivers/message/fusion/mptbase.c: In function ‘mptbase_reply’:
drivers/message/fusion/mptbase.c:7747:62: warning: array subscript 1 is above array bounds of ‘U32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds]
 7747 |     ioc-&gt;events[idx].data[ii] = le32_to_cpu(pEventReply-&gt;Data[ii]);
./include/uapi/linux/byteorder/little_endian.h:34:51: note: in definition of macro ‘__le32_to_cpu’
   34 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
      |                                                   ^
drivers/message/fusion/mptbase.c:7747:33: note: in expansion of macro ‘le32_to_cpu’
 7747 |     ioc-&gt;events[idx].data[ii] = le32_to_cpu(pEventReply-&gt;Data[ii]);
      |

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/109
Link: https://lore.kernel.org/r/20210324230036.GA67851@embeddedor
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: message: fusion: Fix 'physical' typos</title>
<updated>2021-01-27T04:25:16+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2021-01-26T21:03:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a927ec3995427e9c47752900ad2df0755d02aba5'/>
<id>urn:sha1:a927ec3995427e9c47752900ad2df0755d02aba5</id>
<content type='text'>
Fix misspellings of "physical".

Link: https://lore.kernel.org/r/20210126210328.2918631-1-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: message: fusion: fix a few trivial spelling mistakes</title>
<updated>2018-09-12T01:18:06+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-09-10T09:11:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94e989dee2b730e8e3c3d5b71ce54f93dce7b62e'/>
<id>urn:sha1:94e989dee2b730e8e3c3d5b71ce54f93dce7b62e</id>
<content type='text'>
Trival fix to spelling mistakes:

 PrimativeSeqErrCount -&gt; PrimitiveSeqErrCount
 Primative -&gt; Primitive
 primative -&gt; primitive
 mptsas_broadcast_primative_work -&gt; mptsas_broadcast_primitive_work
 Broadcase -&gt; Broadcast

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
