-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
staging: vchiq_arm: rework vchiq_ioc_copy_element_data
The function is passed to vchiq_core.c for it to go trough all the transfer elements (an array of pointers to data) and copy them into the actual transfer memory (contiguous memory). The logic in the function was "copy an element and return, except when the element is empty, in which case look for the next non-empty element and copy it. The function will be called as many times as necessary until all the elements are copied". Now, this approach already forces the function to loop around elements and felt convoluted, so it was changed to a more straightforward "Copy all the elements into memory as long as they fit". The resulting function is shorter and simpler. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Acked-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Loading branch information
Nicolas Saenz Julienne
authored and
Greg Kroah-Hartman
committed
Nov 27, 2018
1 parent
ee43f74
commit 44c1e1b
Showing
1 changed file
with
31 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters