firmware: arm_sdei: Cleanup on cross call function
This applies cleanup on the cross call functions, no functional changes are introduced: * Wrap the code block of CROSSCALL_INIT inside "do { } while (0)" as linux kernel usually does. Otherwise, scripts/checkpatch.pl reports warning regarding this. * Use smp_call_func_t for @fn argument in sdei_do_cross_call() as the function is called on target CPU(s). * Remove unnecessary space before @event in sdei_do_cross_call() Signed-off-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: James Morse <james.morse@arm.com> Link: https://lore.kernel.org/r/20200922130423.10173-11-gshan@redhat.com Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
Родитель
b06146b698
Коммит
a27c04e1de
|
@ -78,11 +78,15 @@ struct sdei_crosscall_args {
|
|||
int first_error;
|
||||
};
|
||||
|
||||
#define CROSSCALL_INIT(arg, event) (arg.event = event, \
|
||||
arg.first_error = 0, \
|
||||
atomic_set(&arg.errors, 0))
|
||||
#define CROSSCALL_INIT(arg, event) \
|
||||
do { \
|
||||
arg.event = event; \
|
||||
arg.first_error = 0; \
|
||||
atomic_set(&arg.errors, 0); \
|
||||
} while (0)
|
||||
|
||||
static inline int sdei_do_cross_call(void *fn, struct sdei_event * event)
|
||||
static inline int sdei_do_cross_call(smp_call_func_t fn,
|
||||
struct sdei_event *event)
|
||||
{
|
||||
struct sdei_crosscall_args arg;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче