scsi: bfa: bfa_fcpim: Make structure cmnd_z0 constant
Subsystems (2)
PATCH 1/1 scsi: bfa: bfa_fcpim: Make structure cmnd_z0 constant
Static structure cmnd_z0, of type fcp_cmnd_s, is only used when being copied into another variable. Hence make it constant to protect it from modification.
Issue found with Coccinelle.
Signed-off-by Nishka Dasgupta <[email protected]>
--- drivers/scsi/bfa/bfa_fcpim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/bfa/bfa_fcpim.c +1 -1
@@ -2450,7 +2450,7 @@ bfa_ioim_send_ioreq(struct bfa_ioim_s *ioim) {struct bfa_itnim_s *itnim = ioim->itnim;struct bfi_ioim_req_s *m; -static struct fcp_cmnd_s cmnd_z0 = { { {0 } } }; +static const struct fcp_cmnd_s cmnd_z0 = { { {0 } } };struct bfi_sge_s *sge, *sgpge;u32 pgdlen =0 ;u32 fcp_dl;
Signature · 1 line
2.19.1