diff options
author | Kees Cook <keescook@chromium.org> | 2022-01-05 20:36:33 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-01-07 17:19:51 +0300 |
commit | 315d049ad1951cef02d9337a2469cac51cca6932 (patch) | |
tree | 539c402fe20e9995aa0a93f32eb708d2f5a15140 /arch | |
parent | 5d9224fb076e9a2023e0b06d6a164d644612c0c0 (diff) | |
download | linux-315d049ad1951cef02d9337a2469cac51cca6932.tar.xz |
scsi: megaraid: Avoid mismatched storage type sizes
Remove needless use of mbox_t, replacing with just struct
mbox_out. Silences compiler warnings under a -Warray-bounds build:
drivers/scsi/megaraid.c: In function 'megaraid_probe_one':
drivers/scsi/megaraid.c:3615:30: error: array subscript 'mbox_t[0]' is partly outside array bounds of 'unsigned char[15]' [-Werror=array-bounds]
3615 | mbox->m_out.xferaddr = (u32)adapter->buf_dma_handle;
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/megaraid.c:3599:23: note: while referencing 'raw_mbox'
3599 | unsigned char raw_mbox[sizeof(struct mbox_out)];
| ^~~~~~~~
Link: https://lore.kernel.org/r/20220105173633.2421129-1-keescook@chromium.org
Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Sumit Saxena <sumit.saxena@broadcom.com>
Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: megaraidlinux.pdl@broadcom.com
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions