2014-01-08 13:48:57

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] crypto: mxs - Fix sparse non static symbol warning

From: Wei Yongjun <[email protected]>

Fixes the following sparse warning:

drivers/crypto/mxs-dcp.c:103:1: warning:
symbol 'global_mutex' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/crypto/mxs-dcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index d41917c..a6db7fa 100644
--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -100,7 +100,7 @@ struct dcp_sha_req_ctx {
* design of Linux Crypto API.
*/
static struct dcp *global_sdcp;
-DEFINE_MUTEX(global_mutex);
+static DEFINE_MUTEX(global_mutex);

/* DCP register layout. */
#define MXS_DCP_CTRL 0x00


2014-01-09 14:51:15

by Marek Vasut

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: mxs - Fix sparse non static symbol warning

On Wednesday, January 08, 2014 at 02:48:56 PM, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> Fixes the following sparse warning:
>
> drivers/crypto/mxs-dcp.c:103:1: warning:
> symbol 'global_mutex' was not declared. Should it be static?
>
> Signed-off-by: Wei Yongjun <[email protected]>
> ---
> drivers/crypto/mxs-dcp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
> index d41917c..a6db7fa 100644
> --- a/drivers/crypto/mxs-dcp.c
> +++ b/drivers/crypto/mxs-dcp.c
> @@ -100,7 +100,7 @@ struct dcp_sha_req_ctx {
> * design of Linux Crypto API.
> */
> static struct dcp *global_sdcp;
> -DEFINE_MUTEX(global_mutex);
> +static DEFINE_MUTEX(global_mutex);
>
> /* DCP register layout. */
> #define MXS_DCP_CTRL 0x00

Thank you.

Acked-by: Marek Vasut <[email protected]>

Best regards,
Marek Vasut

2014-01-15 03:43:28

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: mxs - Fix sparse non static symbol warning

On Thu, Jan 09, 2014 at 03:43:01PM +0100, Marek Vasut wrote:
> On Wednesday, January 08, 2014 at 02:48:56 PM, Wei Yongjun wrote:
> > From: Wei Yongjun <[email protected]>
> >
> > Fixes the following sparse warning:
> >
> > drivers/crypto/mxs-dcp.c:103:1: warning:
> > symbol 'global_mutex' was not declared. Should it be static?
> >
> > Signed-off-by: Wei Yongjun <[email protected]>
> > ---
> > drivers/crypto/mxs-dcp.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
> > index d41917c..a6db7fa 100644
> > --- a/drivers/crypto/mxs-dcp.c
> > +++ b/drivers/crypto/mxs-dcp.c
> > @@ -100,7 +100,7 @@ struct dcp_sha_req_ctx {
> > * design of Linux Crypto API.
> > */
> > static struct dcp *global_sdcp;
> > -DEFINE_MUTEX(global_mutex);
> > +static DEFINE_MUTEX(global_mutex);
> >
> > /* DCP register layout. */
> > #define MXS_DCP_CTRL 0x00
>
> Thank you.
>
> Acked-by: Marek Vasut <[email protected]>

Patch applied.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt