merged.

Bruce

In message: [linux-yocto][v5.15/standard/intel-sdk-5.15/intel-socfpga & 
v5.15/standard/preempt-rt/intel-sdk-5.15/intel-socfpga][PATCH 1/1] firmware: 
stratix10-svc: replace size by pmem->size to avoid undeclared error
on 22/06/2022 Liwei Song wrote:

> The build error is introduced by merge commit:
> f3d210c72471 ("Merge branch 'v5.15-pull-0616-merge' into 
> v5.15/standard/intel-sdk-5.15/intel-socfpga")
> 
> since the definition of "size" is removed, replace it by the same
> definition "pmem->size" to fix below build error, adjust list_del
> to make it consistent with upstream.
> 
> drivers/firmware/stratix10-svc.c: In function 'stratix10_svc_free_memory':
> drivers/firmware/stratix10-svc.c:1591:26: error: 'size' undeclared (first use 
> in this function); did you mean 'ksize'?
>   1591 |         memset(kaddr, 0, size);
>        |                          ^~~~
>        |                          ksize
> drivers/firmware/stratix10-svc.c:1591:26: note: each undeclared identifier is 
> reported only once for each function it appears in
> 
> Signed-off-by: Liwei Song <[email protected]>
> ---
>  drivers/firmware/stratix10-svc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/firmware/stratix10-svc.c 
> b/drivers/firmware/stratix10-svc.c
> index 87c7a01cc39b..dfe76363795f 100644
> --- a/drivers/firmware/stratix10-svc.c
> +++ b/drivers/firmware/stratix10-svc.c
> @@ -1581,6 +1581,7 @@ void stratix10_svc_free_memory(struct 
> stratix10_svc_chan *chan, void *kaddr)
>  
>       list_for_each_entry(pmem, &svc_data_mem, node)
>               if (pmem->vaddr == kaddr) {
> +                     memset(kaddr, 0, pmem->size);
>                       gen_pool_free(chan->ctrl->genpool,
>                                      (unsigned long)kaddr, pmem->size);
>                       pmem->vaddr = NULL;
> @@ -1588,10 +1589,7 @@ void stratix10_svc_free_memory(struct 
> stratix10_svc_chan *chan, void *kaddr)
>                       return;
>               }
>  
> -     memset(kaddr, 0, size);
> -     gen_pool_free(chan->ctrl->genpool, (unsigned long)kaddr, size);
> -     pmem->vaddr = NULL;
> -     list_del(&pmem->node);
> +     list_del(&svc_data_mem);
>  }
>  EXPORT_SYMBOL_GPL(stratix10_svc_free_memory);
>  
> -- 
> 2.32.0
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11416): 
https://lists.yoctoproject.org/g/linux-yocto/message/11416
Mute This Topic: https://lists.yoctoproject.org/mt/91916924/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to