2020-04-23 12:19:50

by Samuel Zou

[permalink] [raw]
Subject: [PATCH -next] hwrng: cctrng - Make some symbols static

Fix the following sparse warnings:

drivers/char/hw_random/cctrng.c:316:6: warning: symbol
'cc_trng_compwork_handler' was not declared. Should it be static?
drivers/char/hw_random/cctrng.c:451:6: warning: symbol
'cc_trng_startwork_handler' was not declared. Should it be static?

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zou Wei <[email protected]>
---
drivers/char/hw_random/cctrng.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/hw_random/cctrng.c b/drivers/char/hw_random/cctrng.c
index e82716c..3ff37a6 100644
--- a/drivers/char/hw_random/cctrng.c
+++ b/drivers/char/hw_random/cctrng.c
@@ -313,7 +313,7 @@ static void cc_trng_hw_trigger(struct cctrng_drvdata *drvdata)
cc_trng_enable_rnd_source(drvdata);
}

-void cc_trng_compwork_handler(struct work_struct *w)
+static void cc_trng_compwork_handler(struct work_struct *w)
{
u32 isr = 0;
u32 ehr_valid = 0;
@@ -448,7 +448,7 @@ static irqreturn_t cc_isr(int irq, void *dev_id)
return IRQ_HANDLED;
}

-void cc_trng_startwork_handler(struct work_struct *w)
+static void cc_trng_startwork_handler(struct work_struct *w)
{
struct cctrng_drvdata *drvdata =
container_of(w, struct cctrng_drvdata, startwork);
--
2.6.2


2020-04-23 14:21:47

by Hadar Gat

[permalink] [raw]
Subject: RE: [PATCH -next] hwrng: cctrng - Make some symbols static


> -----Original Message-----
> From: Zou Wei <[email protected]>
> Sent: Thursday, 23 April 2020 15:21
>
> Fix the following sparse warnings:
>
> drivers/char/hw_random/cctrng.c:316:6: warning: symbol
> 'cc_trng_compwork_handler' was not declared. Should it be static?
> drivers/char/hw_random/cctrng.c:451:6: warning: symbol
> 'cc_trng_startwork_handler' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Zou Wei <[email protected]>
> ---
> drivers/char/hw_random/cctrng.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/char/hw_random/cctrng.c
> b/drivers/char/hw_random/cctrng.c index e82716c..3ff37a6 100644
> --- a/drivers/char/hw_random/cctrng.c
> +++ b/drivers/char/hw_random/cctrng.c
> @@ -313,7 +313,7 @@ static void cc_trng_hw_trigger(struct cctrng_drvdata
> *drvdata)
> cc_trng_enable_rnd_source(drvdata);
> }
>
> -void cc_trng_compwork_handler(struct work_struct *w)
> +static void cc_trng_compwork_handler(struct work_struct *w)
> {
> u32 isr = 0;
> u32 ehr_valid = 0;
> @@ -448,7 +448,7 @@ static irqreturn_t cc_isr(int irq, void *dev_id)
> return IRQ_HANDLED;
> }
>
> -void cc_trng_startwork_handler(struct work_struct *w)
> +static void cc_trng_startwork_handler(struct work_struct *w)
> {
> struct cctrng_drvdata *drvdata =
> container_of(w, struct cctrng_drvdata, startwork);
> --
> 2.6.2

Acked-by: Hadar Gat <[email protected]>

2020-04-30 05:33:41

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH -next] hwrng: cctrng - Make some symbols static

Zou Wei <[email protected]> wrote:
> Fix the following sparse warnings:
>
> drivers/char/hw_random/cctrng.c:316:6: warning: symbol
> 'cc_trng_compwork_handler' was not declared. Should it be static?
> drivers/char/hw_random/cctrng.c:451:6: warning: symbol
> 'cc_trng_startwork_handler' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Zou Wei <[email protected]>
> ---
> drivers/char/hw_random/cctrng.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

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