[PATCH] staging: media/atomisp: don't use index pointer for debug messages

From: Karthik Alapati
Date: Thu Jun 23 2022 - 15:38:05 EST


there are some debug messages which use index pointer of
list which may not always point to the right entry as in
the case where the required entry is not found and the
list traversal completes with index pointer pointing
to the last entry

Signed-off-by: Karthik Alapati <mail@xxxxxxxxxxx>
---
drivers/staging/media/atomisp/pci/atomisp_cmd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
index 97d5a528969b..ec030e3aeae5 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
@@ -956,7 +956,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
asd->s3a_bufs_in_css[css_pipe_id]--;
atomisp_3a_stats_ready_event(asd, buffer.css_buffer.exp_id);
dev_dbg(isp->dev, "%s: s3a stat with exp_id %d is ready\n",
- __func__, s3a_buf->s3a_data->exp_id);
+ __func__, buffer.css_buffer.exp_id);
break;
case IA_CSS_BUFFER_TYPE_METADATA:
if (error)
@@ -976,7 +976,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
asd->metadata_bufs_in_css[stream_id][css_pipe_id]--;
atomisp_metadata_ready_event(asd, md_type);
dev_dbg(isp->dev, "%s: metadata with exp_id %d is ready\n",
- __func__, md_buf->metadata->exp_id);
+ __func__, buffer.css_buffer.exp_id);
break;
case IA_CSS_BUFFER_TYPE_DIS_STATISTICS:
list_for_each_entry_safe(dis_buf, _dis_buf_tmp,
@@ -995,7 +995,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
}
asd->dis_bufs_in_css--;
dev_dbg(isp->dev, "%s: dis stat with exp_id %d is ready\n",
- __func__, dis_buf->dis_data->exp_id);
+ __func__, buffer.css_buffer.exp_id);
break;
case IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME:
case IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME:
--
2.36.1