mpi3mr: Fix partly outside array bounds type warnings
Subsystems (2)
Sreekanth Reddy
maintainercover mpi3mr: Fix partly outside array bounds type warnings
Fix below compilation warning reported with W=1,
include/linux/find.h:40:23: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'u32[1]' {aka 'unsigned int[1]'} [-Warray-bounds]
40 | val = *addr & GENMASK(size - 1, offset);
| ^~~~~
drivers/scsi/mpi3mr/mpi3mr_transport.c:1610:27: note: while referencing
'phys_to_be_added'
1610 | u32 phy_mask_xor, phys_to_be_added, phys_to_be_removed;
| ^~~~~~~~~~~~~~~~Sreekanth Reddy (1):
mpi3mr: Fix partly outside array bounds type warnings
drivers/scsi/mpi3mr/mpi3mr_transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.27.0
Sreekanth Reddy
maintainerPATCH 1/1 mpi3mr: Fix partly outside array bounds type warnings
Fixed 'is partly outside array bounds of' type
compilation warnings.
Reported-by kernel test robot <[email protected]>
Reported-by Stephen Rothwell <[email protected]>
Signed-off-by Sreekanth Reddy <[email protected]>
--- drivers/scsi/mpi3mr/mpi3mr_transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/mpi3mr/mpi3mr_transport.c +2 -1
@@ -1607,7 +1607,8 @@ mpi3mr_update_mr_sas_port(struct mpi3mr_ioc *mrioc, struct host_port *h_port, struct mpi3mr_sas_port *mr_sas_port) {struct mpi3mr_sas_phy *mr_sas_phy; -u32 phy_mask_xor, phys_to_be_added, phys_to_be_removed; +u32 phy_mask_xor; +u64 phys_to_be_added, phys_to_be_removed;int i; h_port->used =1 ;
Signature · 1 line
2.27.0
Sreekanth,
Quoted 1 line
Fix below compilation warning reported with W=1,
Amended original commit. Thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering