public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor•apana.org.au>
To: Stephen Rothwell <sfr@canb•auug.org.au>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
	Mathias Krause <minipli@googlemail•com>
Subject: Re: linux-next: build warning after merge of the final tree
Date: Tue, 16 Aug 2011 14:04:10 +0800	[thread overview]
Message-ID: <20110816060410.GA7013@gondor.apana.org.au> (raw)
In-Reply-To: <20110816152234.26afbea89bfe896d95177ad7@canb.auug.org.au>

On Tue, Aug 16, 2011 at 03:22:34PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) produced this warning:
> 
> In file included from security/integrity/ima/../integrity.h:16:0,
>                  from security/integrity/ima/ima.h:27,
>                  from security/integrity/ima/ima_policy.c:20:
> include/crypto/sha.h:86:10: warning: 'struct shash_desc' declared inside parameter list
> include/crypto/sha.h:86:10: warning: its scope is only this definition or declaration, which is probably not what you want
> 
> Introduced by commit 7c390170b493 ("crypto: sha1 - export sha1_update for
> reuse").  I guess you need to include crypto/hash.h in crypto/sha.h.

Thanks for the report.

Does this patch fix the problem?

commit 4619b6bdb71362d95810f475cc61a6de9d0b1904
Author: Herbert Xu <herbert@gondor•apana.org.au>
Date:   Tue Aug 16 14:03:05 2011 +0800

    crypto: sha - Fix build error due to crypto_sha1_update
    
    On Tue, Aug 16, 2011 at 03:22:34PM +1000, Stephen Rothwell wrote:
    >
    > After merging the final tree, today's linux-next build (powerpc
    > allyesconfig) produced this warning:
    >
    > In file included from security/integrity/ima/../integrity.h:16:0,
    >                  from security/integrity/ima/ima.h:27,
    >                  from security/integrity/ima/ima_policy.c:20:
    > include/crypto/sha.h:86:10: warning: 'struct shash_desc' declared inside parameter list
    > include/crypto/sha.h:86:10: warning: its scope is only this definition or declaration, which is probably not what you want
    >
    > Introduced by commit 7c390170b493 ("crypto: sha1 - export sha1_update for
    > reuse").  I guess you need to include crypto/hash.h in crypto/sha.h.
    
    This patch fixes this by providing a declaration for struct shash_desc.
    
    Reported-by: Stephen Rothwell <sfr@canb•auug.org.au>
    Signed-off-by: Herbert Xu <herbert@gondor•apana.org.au>

diff --git a/include/crypto/sha.h b/include/crypto/sha.h
index 83e6be5..c6c9c1f 100644
--- a/include/crypto/sha.h
+++ b/include/crypto/sha.h
@@ -82,6 +82,8 @@ struct sha512_state {
 	u8 buf[SHA512_BLOCK_SIZE];
 };
 
+struct shash_desc;
+
 extern int crypto_sha1_update(struct shash_desc *desc, const u8 *data,
 			      unsigned int len);
 
Cheers,
-- 
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

  reply	other threads:[~2011-08-16  6:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-16  5:22 linux-next: build warning after merge of the final tree Stephen Rothwell
2011-08-16  6:04 ` Herbert Xu [this message]
2011-08-16  7:03   ` Stephen Rothwell
2011-08-16  7:08     ` Herbert Xu
  -- strict thread matches above, loose matches on Subject: below --
2013-05-29  5:29 Stephen Rothwell
2013-05-29  5:44 ` David Miller
2013-04-19  8:07 Stephen Rothwell
2013-04-19  9:44 ` Joerg Roedel
2012-12-17  3:22 Stephen Rothwell
2012-12-17  3:34 ` Stephen Rothwell
2012-12-17 20:59   ` Andrew Morton
2012-08-02  4:04 Stephen Rothwell
2012-08-02 14:45 ` Nathan Zimmer
2012-03-26  4:11 Stephen Rothwell
2012-03-28  7:59 ` Williams, Dan J
2011-07-22  6:24 Stephen Rothwell
2011-07-22  6:26 ` David Miller
2010-09-29  4:02 Stephen Rothwell
2010-09-16  5:05 Stephen Rothwell
2010-09-16  6:29 ` Jens Axboe
2010-05-26  5:15 Stephen Rothwell
2010-03-01  8:14 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110816060410.GA7013@gondor.apana.org.au \
    --to=herbert@gondor$(echo .)apana.org.au \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=minipli@googlemail$(echo .)com \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox