From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751484AbdFGQll (ORCPT ); Wed, 7 Jun 2017 12:41:41 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:33798 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750831AbdFGQlk (ORCPT ); Wed, 7 Jun 2017 12:41:40 -0400 Date: Wed, 7 Jun 2017 09:41:38 -0700 From: Matthias Kaehlcke To: David Rientjes Cc: Linus Torvalds , Arnd Bergmann , Linux Kernel Mailing List , Andrew Morton , Greg Kroah-Hartman , Ingo Molnar , Thomas Gleixner , Christoph Hellwig , Jens Axboe , Steven Rostedt , Douglas Anderson , Guenter Roeck , Mark Brown , David Miller Subject: Re: [patch] compiler, clang: move inline definition to compiler-gcc.h Message-ID: <20170607164138.GB141096@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org El Tue, Jun 06, 2017 at 10:56:49PM -0700 David Rientjes ha dit: > The motivation of commit abb2ea7dfd82 ("compiler, clang: suppress warning > for unused static inline functions") is to suppress clang's warnings about > unused static inline functions. > > Clang defines __GNUC__ so it inherits all of compiler-gcc.h as well, so > the redefinition of `inline' ends up overriding the definition in > compiler-gcc.h. > > Simply annotate all inline functions as __attribute__((unused)). It's > necessary to suppress the warning for clang and is implicit with gcc. > > Reported-by: Matthias Kaehlcke > Signed-off-by: David Rientjes > --- Tested-by: Matthias Kaehlcke