On 06/01/2026 8:40 am, Nicola Vetrini wrote: > On 2026-01-06 09:26, Bertrand Marquis wrote: >> Hi Nicolas, >> >> On this subject, could you help me understand what the following >> error mean and how I should fix that: >> https://eclair-analysis-logs.xenproject.org/fs/space/verdesse0/XEN.ecdf/xen-project/hardware/xen-staging/ECLAIR_normal/andrew/eclair/ARM64/12604499722/PROJECT.ecd;/by_service/MC3A2.R20.12.html >> >> > > Hi Bertrand, > > the point here is that the macro parameter 'FFA_VERSION' is itself a > macro. This means that inside 'FW_ABI' and similar macros one > occurrence of the 'abi' macro parameter will be further expanded to > the value of 'FFA_VERSION', while the one used for stringification > will not. This is potentially confusing for some programmers that do > not know well the semantics of the preprocessor, which is why MISRA > discourages it, but in these cases I would say it's very much > intentional. There are already a few deviations for special cases > (e.g. BUILD_BUG_ON uses the same pattern to print the condition), so I > would suggest adding the macro FW_ABI to the deviation.
We have a bunch of those on the x86 side too. https://eclair-analysis-logs.xenproject.org/fs/space/verdesse0/XEN.ecdf/xen-project/hardware/xen-staging/ECLAIR_normal/andrew/eclair/X86_64/12611734537/PROJECT.ecd;/by_service/MC3A2.R20.12.html Here, we're using the numeric value for making a hypercall, but rendering the textural name for failure messages as it's more helpful than just the param number. ~Andrew
