Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753921AbdFSPxq (ORCPT ); Mon, 19 Jun 2017 11:53:46 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33228 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751884AbdFSPxn (ORCPT ); Mon, 19 Jun 2017 11:53:43 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org F1B34605BD Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=psodagud@codeaurora.org From: Prasad Sodagudi To: mark.rutland@arm.com, will.deacon@arm.com, catalin.marinas@arm.com, rientjes@google.com Cc: mingo@kernel.org, peterz@infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Prasad Sodagudi Subject: [PATCH] compiler, clang: Add always_inline attribute to inline Date: Mon, 19 Jun 2017 08:53:16 -0700 Message-Id: <1497887596-8731-1-git-send-email-psodagud@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <20170615155440.GC26471@leverpostej> References: <20170615155440.GC26471@leverpostej> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1114 Lines: 29 Commit abb2ea7dfd82 ("compiler, clang: suppress warning for unused static inline functions") re-defining the 'inline' macro but __attribute__((always_inline)) is missing. Some compilers may not honor inline hint if always_iniline attribute not there. So add always_inline attribute to inline as done by compiler-gcc.h file. Signed-off-by: Prasad Sodagudi --- include/linux/compiler-clang.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index d614c5e..deb65b3 100644 --- a/include/linux/compiler-clang.h +++ b/include/linux/compiler-clang.h @@ -22,4 +22,9 @@ * directives. Suppress the warning in clang as well. */ #undef inline +#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ + !defined(CONFIG_OPTIMIZE_INLINING) +#define inline inline __attribute__((always_inline)) __attribute__((unused)) notrace +#else #define inline inline __attribute__((unused)) notrace +#endif -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project