diff mbox series

[next] scsi: mpi3mr: fix uninitialized variables in mpi3mr_bring_ioc_ready

Message ID 20240928-driver-fixes-for-mpi3mr_fw-v1-1-fc340a71e19a@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series [next] scsi: mpi3mr: fix uninitialized variables in mpi3mr_bring_ioc_ready | expand

Commit Message

Abdulrasaq Lawani Sept. 28, 2024, 9:17 p.m. UTC
Initialize the `start_time` & `elapsed_time_sec` variable
to prevent errors when calculating elapsed_time_sec.

Signed-off-by: Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
---
 drivers/scsi/mpi3mr/mpi3mr_fw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


---
base-commit: 40e0c9d414f57d450e3ad03c12765e797fc3fede
change-id: 20240928-driver-fixes-for-mpi3mr_fw-2fac1a9bda03

Best regards,

Comments

Sathya Prakash Veerichetty Oct. 8, 2024, 12:17 a.m. UTC | #1
On Sat, Sep 28, 2024 at 3:17 PM Abdulrasaq Lawani
<abdulrasaqolawani@gmail.com> wrote:
>
> Initialize the `start_time` & `elapsed_time_sec` variable
> to prevent errors when calculating elapsed_time_sec.
>
> Signed-off-by: Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
> ---
>  drivers/scsi/mpi3mr/mpi3mr_fw.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
> index f1ab76351bd8..f93968b76883 100644
> --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
> +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
> @@ -1363,7 +1363,8 @@ static int mpi3mr_bring_ioc_ready(struct mpi3mr_ioc *mrioc)
>         enum mpi3mr_iocstate ioc_state;
>         u64 base_info;
>         u8 retry = 0;
> -       u64 start_time, elapsed_time_sec;
> +       u64 start_time = 0;
> +       u64 elapsed_time_sec = 0;
>>Thanks for identifying this issue, however, we need to do some additional changes on top of this, Broadcom engineers will submit a better patch soon.
>
>  retry_bring_ioc_ready:
>
>
> ---
> base-commit: 40e0c9d414f57d450e3ad03c12765e797fc3fede
> change-id: 20240928-driver-fixes-for-mpi3mr_fw-2fac1a9bda03
>
> Best regards,
> --
> Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
>
diff mbox series

Patch

diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index f1ab76351bd8..f93968b76883 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -1363,7 +1363,8 @@  static int mpi3mr_bring_ioc_ready(struct mpi3mr_ioc *mrioc)
 	enum mpi3mr_iocstate ioc_state;
 	u64 base_info;
 	u8 retry = 0;
-	u64 start_time, elapsed_time_sec;
+	u64 start_time = 0;
+	u64 elapsed_time_sec = 0;
 
 retry_bring_ioc_ready: