From mboxrd@z Thu Jan 1 00:00:00 1970 From: Randy Dunlap Subject: [PATCH] sparse: ignore indirect_branch attribute Date: Tue, 13 Feb 2018 13:52:54 -0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from bombadil.infradead.org ([198.137.202.133]:54758 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965843AbeBMVw4 (ORCPT ); Tue, 13 Feb 2018 16:52:56 -0500 Content-Language: en-US Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-sparse@vger.kernel.org To: Linux-Sparse , Christopher Li , Linus Torvalds From: Randy Dunlap 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 --- 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)