Skip to contentSkip to conversation

misc: fastrpc: Use USER_PD define in fastrpc_get_info_from_dsp

PATCH In review Abel Vesa 3 participants 3 messages Aug 16, 2022 – Aug 17, 2022

Subsystems (3)
lore
Share & tools
lore

Abel Vesa

author
#0 lore raw

PATCH 1/1 misc: fastrpc: Use USER_PD define in fastrpc_get_info_from_dsp

There are defines for each type of protection domain now. Use the USER_PD instead of magic value in fastrpc_get_info_from_dsp.

Cc Srinivas Kandagatla <[email protected]>
Cc Amol Maheshwari <[email protected]>
---
 drivers/misc/fastrpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/fastrpc.c +1 -1
index 93ebd174d848..8895ca593911 100644
@@ -1515,7 +1515,7 @@ static int fastrpc_get_info_from_dsp(struct fastrpc_user *fl, uint32_t *dsp_attr
 	args[1].ptr = (u64)(uintptr_t)&dsp_attr_buf[1];
 	args[1].length = dsp_attr_buf_len;
 	args[1].fd = -1;
-	fl->pd = 1;
+	fl->pd = USER_PD;
 
 	return fastrpc_internal_invoke(fl, true, FASTRPC_DSP_UTILITIES_HANDLE,
 				       FASTRPC_SCALARS(0, 1, 1), args);
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Abel Vesa

There are defines for each type of protection domain now. Use the USER_PD instead of magic value in fastrpc_get_info_from_dsp.

Cc Srinivas Kandagatla <[email protected]>
Cc Amol Maheshwari <[email protected]>

This looks like it got the only remaining magic value assignment.

Quoted 20 lines
---
 drivers/misc/fastrpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/fastrpc.c +1 -1
index 93ebd174d848..8895ca593911 100644
@@ -1515,7 +1515,7 @@ static int fastrpc_get_info_from_dsp(struct fastrpc_user *fl, uint32_t *dsp_attr
 	args[1].ptr = (u64)(uintptr_t)&dsp_attr_buf[1];
 	args[1].length = dsp_attr_buf_len;
 	args[1].fd = -1;
-	fl->pd = 1;
+	fl->pd = USER_PD;
 
 	return fastrpc_internal_invoke(fl, true, FASTRPC_DSP_UTILITIES_HANDLE,
 				       FASTRPC_SCALARS(0, 1, 1), args);
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#2 lore raw
In reply to Abel Vesa
Quoted 7 lines · Abel Vesa

There are defines for each type of protection domain now. Use the USER_PD instead of magic value in fastrpc_get_info_from_dsp.

Cc Srinivas Kandagatla <[email protected]>
Cc Amol Maheshwari <[email protected]>

---

LGTM

--srini

Quoted 16 lines
  drivers/misc/fastrpc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/fastrpc.c +1 -1
index 93ebd174d848..8895ca593911 100644
@@ -1515,7 +1515,7 @@ static int fastrpc_get_info_from_dsp(struct fastrpc_user *fl, uint32_t *dsp_attr
  	args[1].ptr = (u64)(uintptr_t)&dsp_attr_buf[1];
  	args[1].length = dsp_attr_buf_len;
  	args[1].fd = -1;
-	fl->pd = 1;
+	fl->pd = USER_PD;
 
  	return fastrpc_internal_invoke(fl, true, FASTRPC_DSP_UTILITIES_HANDLE,
  				       FASTRPC_SCALARS(0, 1, 1), args);