diff options
| author | Frank Li <Frank.Li@nxp.com> | 2024-04-19 18:07:28 +0300 | 
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2024-04-25 12:11:18 +0300 | 
| commit | 1cb49f389d5985bd9ad6ef37f856f368c3120f77 (patch) | |
| tree | d4294c704a16b9f7fb0c4631893335e5d8a6453e /drivers/usb/cdns3/cdns3-trace.c | |
| parent | 458bb56d53c9758ef873b4f373660b1f02b98d86 (diff) | |
| download | linux-1cb49f389d5985bd9ad6ef37f856f368c3120f77.tar.xz | |
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 'drivers/usb/cdns3/cdns3-trace.c')
0 files changed, 0 insertions, 0 deletions
