File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -833,6 +833,16 @@ static int fastrpc_create_maps(struct fastrpc_invoke_ctx *ctx)
833
833
return 0 ;
834
834
}
835
835
836
+ static struct fastrpc_invoke_buf * fastrpc_invoke_buf_start (union fastrpc_remote_arg * pra , int len )
837
+ {
838
+ return (struct fastrpc_invoke_buf * )(& pra [len ]);
839
+ }
840
+
841
+ static struct fastrpc_phy_page * fastrpc_phy_page_start (struct fastrpc_invoke_buf * buf , int len )
842
+ {
843
+ return (struct fastrpc_phy_page * )(& buf [len ]);
844
+ }
845
+
836
846
static int fastrpc_get_args (u32 kernel , struct fastrpc_invoke_ctx * ctx )
837
847
{
838
848
struct device * dev = ctx -> fl -> sctx -> dev ;
@@ -860,9 +870,8 @@ static int fastrpc_get_args(u32 kernel, struct fastrpc_invoke_ctx *ctx)
860
870
return err ;
861
871
862
872
rpra = ctx -> buf -> virt ;
863
- list = ctx -> buf -> virt + ctx -> nscalars * sizeof (* rpra );
864
- pages = ctx -> buf -> virt + ctx -> nscalars * (sizeof (* list ) +
865
- sizeof (* rpra ));
873
+ list = fastrpc_invoke_buf_start (rpra , ctx -> nscalars );
874
+ pages = fastrpc_phy_page_start (list , ctx -> nscalars );
866
875
args = (uintptr_t )ctx -> buf -> virt + metalen ;
867
876
rlen = pkt_size - metalen ;
868
877
ctx -> rpra = rpra ;
You can’t perform that action at this time.
0 commit comments