ASoC: qcom: Constify APR/GPR result structs

APR and GPR callbacks receive pointer to const response packet which
holds the response result.  That result should not be modified by
callback, so make it pointer to const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20251130-asoc-apr-const-v1-4-d0833f3ed423@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Krzysztof Kozlowski
2025-11-30 10:40:26 +01:00
committed by Mark Brown
parent f3a86870c5
commit a2a631830d
6 changed files with 6 additions and 6 deletions

View File

@@ -188,7 +188,7 @@ static void q6adm_free_copp(struct kref *ref)
static int q6adm_callback(struct apr_device *adev, const struct apr_resp_pkt *data)
{
struct aprv2_ibasic_rsp_result_t *result = data->payload;
const struct aprv2_ibasic_rsp_result_t *result = data->payload;
int port_idx, copp_idx;
const struct apr_hdr *hdr = &data->hdr;
struct q6copp *copp;

View File

@@ -961,7 +961,7 @@ static struct q6afe_port *q6afe_find_port(struct q6afe *afe, int token)
static int q6afe_callback(struct apr_device *adev, const struct apr_resp_pkt *data)
{
struct q6afe *afe = dev_get_drvdata(&adev->dev);
struct aprv2_ibasic_rsp_result_t *res;
const struct aprv2_ibasic_rsp_result_t *res;
const struct apr_hdr *hdr = &data->hdr;
struct q6afe_port *port;

View File

@@ -492,7 +492,7 @@ static int graph_callback(const struct gpr_resp_pkt *data, void *priv, int op)
struct data_cmd_rsp_rd_sh_mem_ep_data_buffer_done_v2 *rd_done;
struct data_cmd_rsp_wr_sh_mem_ep_data_buffer_done_v2 *done;
struct apm_cmd_rsp_shared_mem_map_regions *rsp;
struct gpr_ibasic_rsp_result_t *result;
const struct gpr_ibasic_rsp_result_t *result;
struct q6apm_graph *graph = priv;
const struct gpr_hdr *hdr = &data->hdr;
struct device *dev = graph->dev;

View File

@@ -603,7 +603,7 @@ static int32_t q6asm_stream_callback(struct apr_device *adev,
int session_id)
{
struct q6asm *q6asm = dev_get_drvdata(&adev->dev);
struct aprv2_ibasic_rsp_result_t *result;
const struct aprv2_ibasic_rsp_result_t *result;
const struct apr_hdr *hdr = &data->hdr;
struct audio_port_data *port;
struct audio_client *ac;

View File

@@ -70,7 +70,7 @@ static struct q6core *g_core;
static int q6core_callback(struct apr_device *adev, const struct apr_resp_pkt *data)
{
struct q6core *core = dev_get_drvdata(&adev->dev);
struct aprv2_ibasic_rsp_result_t *result;
const struct aprv2_ibasic_rsp_result_t *result;
const struct apr_hdr *hdr = &data->hdr;
result = data->payload;

View File

@@ -179,7 +179,7 @@ static int prm_callback(const struct gpr_resp_pkt *data, void *priv, int op)
{
gpr_device_t *gdev = priv;
struct q6prm *prm = dev_get_drvdata(&gdev->dev);
struct gpr_ibasic_rsp_result_t *result;
const struct gpr_ibasic_rsp_result_t *result;
const struct gpr_hdr *hdr = &data->hdr;
switch (hdr->opcode) {