This series aims to drop the remaining (non-essential) global members to address the following TODO item: ``` * Get rid of all non essential global structures and create a proper per device structure ``` Mainly the global members are moved to be contained inside platform driver data. They can be access via platform_get_drvdata(). Patch 1/6 drops the g_once_init variable as it is not used meaningfully. Patch 2/6 is a prep-up patch for subsequent patches. Patch 3/6 drops global variables tracking connections to vchiq driver through vchiq_connected[.ch]. New struct vchiq_connected is introduced and added to vchiq_drvdata. Patch 4/6 drops g_cache_line_size and use direct value from vchiq_drvdata Patch 5/6 drops global variables pertaining to track memory pages Patch 6/6 is already a completed item - so just a TODO cleanup The user of vchiq_connected.[ch] is not present currently, but the user will be present when we will upstream bcm2835-isp via the vc-sm-cma driver. Posting a branch for reference [1] to provide and test the idea behind this series. [1]: https://git.uk.ideasonboard.com/uajain/linux/commits/branch/uajain/remove-global Changes in v2: - Found even more g_* global variables than v1, so new patches to drop them - Introduce 1/6 as suggested during v1 review - Introuce 6/6 to cleanup the TODO list Umang Jain (6): staging: vc04_services: Drop g_once_init global variable staging: vc04_services: vchiq_arm: Move struct vchiq_drvdata to header staging: vc04_services: Drop global members for tracking connections staging: vc04_services: vchiq_arm: Drop g_cache_line_size staging: vc04_services: Drop global variables tracking allocated pages staging: vc04_services: Drop completed TODO item drivers/staging/vc04_services/interface/TODO | 15 --- .../interface/vchiq_arm/vchiq_arm.c | 109 +++++++++--------- .../interface/vchiq_arm/vchiq_arm.h | 17 +++ .../interface/vchiq_arm/vchiq_connected.c | 43 +++---- .../interface/vchiq_arm/vchiq_connected.h | 15 ++- 5 files changed, 99 insertions(+), 100 deletions(-) base-commit: 68bb540b1aefded1d58a9f956568d5316643d291 -- 2.43.0