Linux SPARSE checker discussions
 help / color / mirror / Atom feed
* [PATCH] sparse: ignore indirect_branch attribute
@ 2018-02-13 21:52 Randy Dunlap
  2018-02-13 22:12 ` Luc Van Oostenryck
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2018-02-13 21:52 UTC (permalink / raw)
  To: Linux-Sparse, Christopher Li, Linus Torvalds

From: Randy Dunlap <rdunlap@infradead.org>

Teach sparse about the "indirect_branch" attribute as used in
Linux kernel:
#define __noretpoline __attribute__((indirect_branch("keep")))
and tell sparse to ignore it.

This eliminates over 148K warnings (which also cause the
0day bot to send error reports uselessly).

Or does sparse need to do something with it?

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
 gcc-attr-list.h |    1 +
 1 file changed, 1 insertion(+)

--- sparse-2018-02-13.orig/gcc-attr-list.h
+++ sparse-2018-02-13/gcc-attr-list.h
@@ -62,6 +62,7 @@ GCC_ATTR(hidden)
 GCC_ATTR(hot)
 GCC_ATTR(hotpatch)
 GCC_ATTR(ifunc)
+GCC_ATTR(indirect_branch)
 GCC_ATTR(init_priority)
 GCC_ATTR(interfacearm)
 GCC_ATTR(internal)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-15 20:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-13 21:52 [PATCH] sparse: ignore indirect_branch attribute Randy Dunlap
2018-02-13 22:12 ` Luc Van Oostenryck
2018-02-15 20:42   ` Luc Van Oostenryck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox