That patch looks fine. Can you add some test case for the hot patch as well? It need to cover the case you run into. Preferably cover each of the variation of hot patch. It will be useful when we parse these attributes properly. Chris On Tue, Apr 28, 2015 at 3:48 AM, Heiko Carstens <heiko.carstens@xxxxxxxxxx> wrote: > gcc knows about a new "hotpatch" attribute which sparse can safely ignore, > since it modifies only which code will be generated just like the > "no_instrument_function" attribute. > > The gcc hotpatch feature patch: > https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=11762b8363737591bfb9c66093bc2edf289b917f > > Currently the Linux kernel makes use of this attribute: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=61f552141c9c0e88b3fdc7046265781ffd8fa68a > > Without this patch sparse will emit warnings like > "error: attribute 'hotpatch': unknown attribute" > > Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx> > --- > parse.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/parse.c b/parse.c > index b43d6835528b..8afae73d5325 100644 > --- a/parse.c > +++ b/parse.c > @@ -540,6 +540,8 @@ const char *ignored_attributes[] = { > "__gnu_inline__", > "hot", > "__hot__", > + "hotpatch", > + "__hotpatch__", > "leaf", > "__leaf__", > "l1_text", > -- > 2.1.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html