]> xenbits.xensource.com Git - xen.git/commit
drivers/smmu-v3: Fix impending MISRA R20.6 violation
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 16 Apr 2025 10:54:04 +0000 (11:54 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 18 Apr 2025 14:16:12 +0000 (15:16 +0100)
commit7b55401529f9c4f5bfbc3232df941a9b6dc324d5
tree82e7beceaf3e0c93aeda2077e00092a50c2bdf9e
parentf6784ea2f967f0bacaad83a0e6a86a648e5d2d65
drivers/smmu-v3: Fix impending MISRA R20.6 violation

cpu_to_le64() is about to become a macro, at which point the #ifdef in the
middle of it becomes undefined behaviour.

Use a local variable to prepare strtab, where the #ifdef is fine to use.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
xen/drivers/passthrough/arm/smmu-v3.c