Skip to content

Commit

Permalink
xen/tasklet: address violations of MISRA C Rule 20.7
Browse files Browse the repository at this point in the history
MISRA C Rule 20.7 states: "Expressions resulting from the expansion
of macro parameters shall be enclosed in parentheses". Therefore, some
macro definitions should gain additional parentheses to ensure that all
current and future users will be safe with respect to expansions that
can possibly alter the semantics of the passed-in macro parameter.

No functional change.

Signed-off-by: Nicola Vetrini <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
  • Loading branch information
nvetrini authored and jbeulich committed Mar 4, 2024
1 parent 47fdf9a commit fc84b4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xen/include/xen/tasklet.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct tasklet

#define _DECLARE_TASKLET(name, func, data, softirq) \
struct tasklet name = { \
LIST_HEAD_INIT(name.list), -1, softirq, 0, 0, func, data }
LIST_HEAD_INIT((name).list), -1, softirq, 0, 0, func, data }
#define DECLARE_TASKLET(name, func, data) \
_DECLARE_TASKLET(name, func, data, 0)
#define DECLARE_SOFTIRQ_TASKLET(name, func, data) \
Expand Down

0 comments on commit fc84b4a

Please sign in to comment.