diff options
author | Frank Li <Frank.Li@nxp.com> | 2024-04-19 11:07:28 -0400 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2024-04-25 14:41:18 +0530 |
commit | 1cb49f389d5985bd9ad6ef37f856f368c3120f77 (patch) | |
tree | d4294c704a16b9f7fb0c4631893335e5d8a6453e /scripts/gdb/linux/tasks.py | |
parent | 458bb56d53c9758ef873b4f373660b1f02b98d86 (diff) |
dmaengine: imx-sdma: utilize compiler to calculate ADDRS_ARRAY_SIZE_V<n>
The macros SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V<n> actually related with the
struct sdma_script_start_addrs.
struct sdma_script_start_addrs {
...
/* End of v1 array */
...
/* End of v2 array */
...
/* End of v3 array */
...
/* End of v4 array */
};
When add new field of sdma_script_start_addrs, it is easy to miss update
SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V<n>.
Employ offsetof for SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V<n> macros instead of
hardcoding numbers. the preprocessing stage will calculate the size for
each version automatically.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20240419150729.1071904-2-Frank.Li@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions