Re: [RFC PATCH 1/6] firmware: helper functions for SMCCC v1.0 invocation conduit

From: Etienne Carriere
Date: Sun Apr 19 2020 - 11:52:09 EST


On Sun, 19 Apr 2020 at 17:05, Etienne Carriere
<etienne.carriere@xxxxxxxxxx> wrote:
>
> +#define arm_smccc_1_0_invoke(...) ({ \
> + enum arm_smccc_conduit conduit = arm_smccc_1_0_get_conduit(); \
> + switch (conduit) { \
> + case SMCCC_CONDUIT_HVC: \
> + arm_smccc_hvc(__VA_ARGS__); \
> + break; \
> + case SMCCC_CONDUIT_SMC: \
> + arm_smccc_smc(__VA_ARGS__); \
> + break; \
> + default: \
> + __fail_smccc_1_0(__VA_ARGS__); \
> + conduit = SMCCC_CONDUIT_NONE; \
> + } \
> + conduit; \
> + })

Checkpatch complains here (traces below) but I think this is a false positive
due to the line breaks in the macro definition.

WARNING: Possible switch case/default not preceded by break or
fallthrough comment
#231: FILE: include/linux/arm-smccc.h:415:
+ case SMCCC_CONDUIT_SMC: \

WARNING: Possible switch case/default not preceded by break or
fallthrough comment
#234: FILE: include/linux/arm-smccc.h:418:
+ default: \

Regards,
Etienne