[PATCH 0/3] staging: vchiq_core: Consolidate bulk xfer helper

Umang Jain posted 3 patches 2 months, 1 week ago
.../interface/vchiq_arm/vchiq_arm.c           | 356 ------------------
.../interface/vchiq_arm/vchiq_core.c          | 350 +++++++++++++++++
.../interface/vchiq_arm/vchiq_core.h          |  30 +-
.../interface/vchiq_arm/vchiq_pagelist.h      |  21 --
4 files changed, 373 insertions(+), 384 deletions(-)
delete mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_pagelist.h
[PATCH 0/3] staging: vchiq_core: Consolidate bulk xfer helper
Posted by Umang Jain 2 months, 1 week ago
Few functions were identified were their declaration, definition
and usage were spread (incorrectly) across vchiq_core and vchiq_arm.

These are being consolidated into vchiq_core in this series.
Please look at individual patches for details.

2/3 is in particular a big one. The code is just a move, but
seems big - as it was diffcult to split it into smaller, compilable
hunks of individual patches.

Umang Jain (3):
  staging: vchiq_core: Move remote_event_signal() vchiq_core
  staging: vchiq_core: Move bulk data functions in vchiq_core
  staging: vchiq_core: Drop vchiq_pagelist.h

 .../interface/vchiq_arm/vchiq_arm.c           | 356 ------------------
 .../interface/vchiq_arm/vchiq_core.c          | 350 +++++++++++++++++
 .../interface/vchiq_arm/vchiq_core.h          |  30 +-
 .../interface/vchiq_arm/vchiq_pagelist.h      |  21 --
 4 files changed, 373 insertions(+), 384 deletions(-)
 delete mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_pagelist.h

-- 
2.45.2
Re: [PATCH 0/3] staging: vchiq_core: Consolidate bulk xfer helper
Posted by Dan Carpenter 2 months ago
On Thu, Sep 19, 2024 at 07:51:27PM +0530, Umang Jain wrote:
> Few functions were identified were their declaration, definition
> and usage were spread (incorrectly) across vchiq_core and vchiq_arm.
> 
> These are being consolidated into vchiq_core in this series.
> Please look at individual patches for details.
> 
> 2/3 is in particular a big one. The code is just a move, but
> seems big - as it was diffcult to split it into smaller, compilable
> hunks of individual patches.
> 
> Umang Jain (3):
>   staging: vchiq_core: Move remote_event_signal() vchiq_core
>   staging: vchiq_core: Move bulk data functions in vchiq_core
>   staging: vchiq_core: Drop vchiq_pagelist.h
> 

Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>

But next time, if you're just moving code around, just ignore checkpatch.  Do
the white space changes as a separate patch.

regards,
dan carpenter

+-                      memcpy_to_page(pages[0],
+-                              pagelist->offset,
+-                              fragments,
+-                              head_bytes);
++                      memcpy_to_page(pages[0], pagelist->offset,
++                                     fragments, head_bytes);
 }
+               if ((actual >= 0) && (head_bytes < actual) &&
+                   (tail_bytes != 0))
+                       memcpy_to_page(pages[num_pages - 1],
+-                              (pagelist->offset + actual) &
+-                              (PAGE_SIZE - 1) & ~(drv_mgmt->info->cache_line_size - 1),
+-                              fragments + drv_mgmt->info->cache_line_size,
+-                              tail_bytes);
++                                     (pagelist->offset + actual) &
++                                     (PAGE_SIZE - 1) & ~(drv_mgmt->info->cache_line_size - 1),
++                                     fragments + drv_mgmt->info->cache_line_size,
++                                     tail_bytes);
Re: [PATCH 0/3] staging: vchiq_core: Consolidate bulk xfer helper
Posted by Umang Jain 2 months ago
Hi Dan,

On 25/09/24 2:53 pm, Dan Carpenter wrote:
> On Thu, Sep 19, 2024 at 07:51:27PM +0530, Umang Jain wrote:
>> Few functions were identified were their declaration, definition
>> and usage were spread (incorrectly) across vchiq_core and vchiq_arm.
>>
>> These are being consolidated into vchiq_core in this series.
>> Please look at individual patches for details.
>>
>> 2/3 is in particular a big one. The code is just a move, but
>> seems big - as it was diffcult to split it into smaller, compilable
>> hunks of individual patches.
>>
>> Umang Jain (3):
>>    staging: vchiq_core: Move remote_event_signal() vchiq_core
>>    staging: vchiq_core: Move bulk data functions in vchiq_core
>>    staging: vchiq_core: Drop vchiq_pagelist.h
>>
> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>

Thanks for reviewing.

>
> But next time, if you're just moving code around, just ignore checkpatch.  Do
> the white space changes as a separate patch.

Thanks for the tip, will surely keep this mind.
>
> regards,
> dan carpenter
>
> +-                      memcpy_to_page(pages[0],
> +-                              pagelist->offset,
> +-                              fragments,
> +-                              head_bytes);
> ++                      memcpy_to_page(pages[0], pagelist->offset,
> ++                                     fragments, head_bytes);
>   }
> +               if ((actual >= 0) && (head_bytes < actual) &&
> +                   (tail_bytes != 0))
> +                       memcpy_to_page(pages[num_pages - 1],
> +-                              (pagelist->offset + actual) &
> +-                              (PAGE_SIZE - 1) & ~(drv_mgmt->info->cache_line_size - 1),
> +-                              fragments + drv_mgmt->info->cache_line_size,
> +-                              tail_bytes);
> ++                                     (pagelist->offset + actual) &
> ++                                     (PAGE_SIZE - 1) & ~(drv_mgmt->info->cache_line_size - 1),
> ++                                     fragments + drv_mgmt->info->cache_line_size,
> ++                                     tail_bytes);
>
Re: [PATCH 0/3] staging: vchiq_core: Consolidate bulk xfer helper
Posted by Umang Jain 2 months, 1 week ago
Hi,

forgot to mention, series to is built and tested on top of

"[PATCH 0/6] staging: vchiq_core: bulk xfer killable() completions"

https://lore.kernel.org/linux-staging/20240918163100.870596-1-umang.jain@ideasonboard.com/T/#t

On 19/09/24 7:51 pm, Umang Jain wrote:
> Few functions were identified were their declaration, definition
> and usage were spread (incorrectly) across vchiq_core and vchiq_arm.
>
> These are being consolidated into vchiq_core in this series.
> Please look at individual patches for details.
>
> 2/3 is in particular a big one. The code is just a move, but
> seems big - as it was diffcult to split it into smaller, compilable
> hunks of individual patches.
>
> Umang Jain (3):
>    staging: vchiq_core: Move remote_event_signal() vchiq_core
>    staging: vchiq_core: Move bulk data functions in vchiq_core
>    staging: vchiq_core: Drop vchiq_pagelist.h
>
>   .../interface/vchiq_arm/vchiq_arm.c           | 356 ------------------
>   .../interface/vchiq_arm/vchiq_core.c          | 350 +++++++++++++++++
>   .../interface/vchiq_arm/vchiq_core.h          |  30 +-
>   .../interface/vchiq_arm/vchiq_pagelist.h      |  21 --
>   4 files changed, 373 insertions(+), 384 deletions(-)
>   delete mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_pagelist.h
>