Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1548778 > unrolled thread

Re: [PATCH] This continues from this commit: 52f5684c8e1e ("kernel: use macros from compiler.h instead of __attribute__((...))")

Started byJoe Perches <joe@perches.com>
First post2016-12-31 01:50 +0100
Last post2016-12-31 17:40 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] This continues from this commit: 52f5684c8e1e ("kernel:  use macros from compiler.h instead of __attribute__((...))") Joe Perches <joe@perches.com> - 2016-12-31 01:50 +0100
    Re: [PATCH] This continues from this commit: 52f5684c8e1e ("kernel:  use macros from compiler.h instead of __attribute__((...))") Herbert Xu <herbert@gondor.apana.org.au> - 2016-12-31 10:10 +0100
      Re: [PATCH] This continues from this commit: 52f5684c8e1e ("kernel:  use macros from compiler.h instead of __attribute__((...))") Joe Perches <joe@perches.com> - 2016-12-31 17:40 +0100

#1548778 — Re: [PATCH] This continues from this commit: 52f5684c8e1e ("kernel: use macros from compiler.h instead of __attribute__((...))")

FromJoe Perches <joe@perches.com>
Date2016-12-31 01:50 +0100
SubjectRe: [PATCH] This continues from this commit: 52f5684c8e1e ("kernel: use macros from compiler.h instead of __attribute__((...))")
Message-ID<sUg1X-445-3@gated-at.bofh.it>
On Sat, 2016-12-31 at 06:11 +0530, gidisrael@gmail.com wrote:
> There is <linux/compiler.h> 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.
[]
> diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c
[]
> @@ -394,7 +395,7 @@ static int crypto_ablkcipher_report(struct sk_buff *skb, struct crypto_alg *alg)
>  #endif
>  
>  static void crypto_ablkcipher_show(struct seq_file *m, struct crypto_alg *alg)
> -	__attribute__ ((unused));
> +	__always_unused;
>  static void crypto_ablkcipher_show(struct seq_file *m, struct crypto_alg *alg)
>  {
>  	struct ablkcipher_alg *ablkcipher = &alg->cra_ablkcipher;
> @@ -468,7 +469,7 @@ static int crypto_givcipher_report(struct sk_buff *skb, struct crypto_alg *alg)
>  #endif
>  
>  static void crypto_givcipher_show(struct seq_file *m, struct crypto_alg *alg)
> -	__attribute__ ((unused));
> +	__always_unused;
>  static void crypto_givcipher_show(struct seq_file *m, struct crypto_alg *alg)
>  {
>  	struct ablkcipher_alg *ablkcipher = &alg->cra_ablkcipher;

Perhaps it'd be better to remove the declaration/prototype
of crypto_ablkcipher_show and surround the definition of
crypto_ablkcipher_show with #ifdef CONFIG_PROC_FS / #endif

[]

> diff --git a/crypto/acompress.c b/crypto/acompress.c
[]
> @@ -50,7 +51,7 @@ static int crypto_acomp_report(struct sk_buff *skb, struct crypto_alg *alg)
>  #endif
>  
>  static void crypto_acomp_show(struct seq_file *m, struct crypto_alg *alg)
> -	__attribute__ ((unused));
> +	__always_unused;

likewise and for others too.

[toc] | [next] | [standalone]


#1548797

FromHerbert Xu <herbert@gondor.apana.org.au>
Date2016-12-31 10:10 +0100
Message-ID<sUnPP-Xk-11@gated-at.bofh.it>
In reply to#1548778
On Fri, Dec 30, 2016 at 04:49:28PM -0800, Joe Perches wrote:
>
> Perhaps it'd be better to remove the declaration/prototype
> of crypto_ablkcipher_show and surround the definition of
> crypto_ablkcipher_show with #ifdef CONFIG_PROC_FS / #endif

No that's stupid.  We want to maximise the compiler coverage.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[toc] | [prev] | [next] | [standalone]


#1548817

FromJoe Perches <joe@perches.com>
Date2016-12-31 17:40 +0100
Message-ID<sUuRj-5jk-7@gated-at.bofh.it>
In reply to#1548797
On Sat, 2016-12-31 at 17:03 +0800, Herbert Xu wrote:
> On Fri, Dec 30, 2016 at 04:49:28PM -0800, Joe Perches wrote:
> > 
> > Perhaps it'd be better to remove the declaration/prototype
> > of crypto_ablkcipher_show and surround the definition of
> > crypto_ablkcipher_show with #ifdef CONFIG_PROC_FS / #endif
> 
> No that's stupid.  We want to maximise the compiler coverage.

stupid is rather a strong word for the most
common technique used in the kernel to avoid
compiler warnings.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web