Warn on non-sensical declarations like: int __user __iomem *ptr; These can be easily be checked at parsing time. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- parse.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/parse.c b/parse.c index d0385f34c..0910f3657 100644 --- a/parse.c +++ b/parse.c @@ -1129,8 +1129,13 @@ static struct token *attribute_address_space(struct token *token, struct symbol warning(token->pos, "invalid address space name"); } - if (Waddress_space && as) + if (Waddress_space && as) { + if (ctx->ctype.as) + sparse_error(token->pos, + "multiple address space given: %s & %s", + show_as(ctx->ctype.as), show_as(as)); ctx->ctype.as = as; + } token = expect(next, ')', "after address_space attribute"); return token; } -- 2.19.0