Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f6ad1506 authored by Deva Ramasubramanian's avatar Deva Ramasubramanian
Browse files

msm: vidc: Refactor macro



Previously, the usage of the venus_hfi_for_each_thing was awkward,
forcing the user to pass in the executable codeblock as an argument.

This had two problems:
	1) It hit a limitation in the C-preprocessor. If the given code
	block contained a ',' (which is common and valid), the
	preprocessor would consider it to be a separate argument to the
	macro, which in turn would cause compile errors.
	e.g. _for_each_xxx(device, xxx, {int a, b;}) would be parsed by
	the preprocessor as _for_each_xxx((device), (xxx), ({int a),
	(b;}))
	2) More importantly, it didn't look good

To overcome this limitation, re-write the macro to be more in line with
macros such as list_for_each(), which doesn't require the codeblock to
be passed in as an argument.

Change-Id: I584300b0a592a6c3665cf526175876871e800bf5
Signed-off-by: default avatarDeva Ramasubramanian <dramasub@codeaurora.org>
parent 773c2fbd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment