Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754644AbcLaJEn (ORCPT ); Sat, 31 Dec 2016 04:04:43 -0500 Received: from helcar.hengli.com.au ([209.40.204.226]:47991 "EHLO helcar.apana.org.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754615AbcLaJEh (ORCPT ); Sat, 31 Dec 2016 04:04:37 -0500 Date: Sat, 31 Dec 2016 17:04:00 +0800 From: Herbert Xu To: gidisrael@gmail.com Cc: davem@davemloft.net, nhorman@tuxdriver.com, akpm@linux-foundation.org, geert@linux-m68k.org, joe@perches.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] This continues from this commit: 52f5684c8e1e ("kernel: use macros from compiler.h instead of __attribute__((...))") Message-ID: <20161231090400.GB16976@gondor.apana.org.au> References: <1483144873-2932-1-git-send-email-gidisrael@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1483144873-2932-1-git-send-email-gidisrael@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1894 Lines: 43 On Sat, Dec 31, 2016 at 06:11:13AM +0530, gidisrael@gmail.com wrote: > From: Gideon Israel Dsouza > > Very sorry about the previous broken patch. Here is an updated one. > > I submitted 4 total patches. They are part of task I've taken up to > increase compiler portability in the kernel. I've cleaned up the > subsystems under /kernel /mm /block and /security, this patch targets > /crypto. > > There is which provides macros for various gcc specific > constructs. Eg: __weak for __attribute__((weak)). I've cleaned all > instances of gcc specific attributes with the right macros for the crypto > subsystem. > > I had to make one additional change into compiler-gcc.h for the case when > one wants to use this: __attribute__((aligned) and not specify an alignment > factor. From the gcc docs, this will result in the largest alignment for > that data type on the target machine so I've named the macro > __aligned_largest. Please advise if another name is more appropriate. > > RFC: There are many places where __attribute((unused)) is used. There are > two macros for the exact same macro inside compiler-gcc.h: > __always_unused and __maybe_unused. I'm not sure which to have used to > replace instances inside /crypto. Should there perhaps be just an unused > macro. There are 1830 instances of __maybe_unused inside the kernel > code and 110 uses of__always_unused excluding my changes. > > Signed-off-by: Gideon Israel Dsouza Please send crypto patches to linux-crypto@vger.kernel.org. > static void crypto_ablkcipher_show(struct seq_file *m, struct crypto_alg *alg) > - __attribute__ ((unused)); > + __always_unused; You should use __maybe_unused. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt