* [PATCH] staging: kpc2000: kpc_dma: fix symbol 'kpc_dma_add_device' was not declared.
@ 2019-06-05 15:57 Valerio Genovese
2019-06-05 16:09 ` Matt Sickler
2019-06-05 16:11 ` Greg KH
0 siblings, 2 replies; 4+ messages in thread
From: Valerio Genovese @ 2019-06-05 15:57 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Valerio Genovese
This was reported by sparse:
drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:39:7: warning: symbol 'kpc_dma_add_device
' was not declared. Should it be static?
Signed-off-by: Valerio Genovese <valerio.click@gmail.com>
---
drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
index ee47f43e71cf..19e88c3bc13f 100644
--- a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
+++ b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
@@ -56,6 +56,7 @@ struct dev_private_data {
};
struct kpc_dma_device *kpc_dma_lookup_device(int minor);
+void kpc_dma_add_device(struct kpc_dma_device *ldev);
extern const struct file_operations kpc_dma_fops;
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] staging: kpc2000: kpc_dma: fix symbol 'kpc_dma_add_device' was not declared.
2019-06-05 15:57 [PATCH] staging: kpc2000: kpc_dma: fix symbol 'kpc_dma_add_device' was not declared Valerio Genovese
@ 2019-06-05 16:09 ` Matt Sickler
2019-06-05 16:11 ` Greg KH
1 sibling, 0 replies; 4+ messages in thread
From: Matt Sickler @ 2019-06-05 16:09 UTC (permalink / raw)
To: Valerio Genovese, gregkh; +Cc: devel, linux-kernel
>This was reported by sparse:
>drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:39:7: warning: symbol
>'kpc_dma_add_device
>' was not declared. Should it be static?
>
>Signed-off-by: Valerio Genovese <valerio.click@gmail.com>
>---
> drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
>b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
>index ee47f43e71cf..19e88c3bc13f 100644
>--- a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
>+++ b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
>@@ -56,6 +56,7 @@ struct dev_private_data {
> };
>
> struct kpc_dma_device *kpc_dma_lookup_device(int minor);
>+void kpc_dma_add_device(struct kpc_dma_device *ldev);
>
> extern const struct file_operations kpc_dma_fops;
>
Wouldn't it be better to mark the function static?
It's only used in kpc_dma_driver.c which is where it's defined.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: kpc2000: kpc_dma: fix symbol 'kpc_dma_add_device' was not declared.
2019-06-05 15:57 [PATCH] staging: kpc2000: kpc_dma: fix symbol 'kpc_dma_add_device' was not declared Valerio Genovese
2019-06-05 16:09 ` Matt Sickler
@ 2019-06-05 16:11 ` Greg KH
2019-06-05 16:56 ` Valerio G
1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2019-06-05 16:11 UTC (permalink / raw)
To: Valerio Genovese; +Cc: devel, linux-kernel
On Wed, Jun 05, 2019 at 05:57:11PM +0200, Valerio Genovese wrote:
> This was reported by sparse:
> drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:39:7: warning: symbol 'kpc_dma_add_device
> ' was not declared. Should it be static?
>
> Signed-off-by: Valerio Genovese <valerio.click@gmail.com>
> ---
> drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
> index ee47f43e71cf..19e88c3bc13f 100644
> --- a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
> +++ b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
> @@ -56,6 +56,7 @@ struct dev_private_data {
> };
>
> struct kpc_dma_device *kpc_dma_lookup_device(int minor);
> +void kpc_dma_add_device(struct kpc_dma_device *ldev);
>
> extern const struct file_operations kpc_dma_fops;
>
This is not how you fix this issue.
Look at the warning given to you. Think about your C programming
knowledge and remember what the 'static' keyword is and does.
Then fix the issue properly.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: kpc2000: kpc_dma: fix symbol 'kpc_dma_add_device' was not declared.
2019-06-05 16:11 ` Greg KH
@ 2019-06-05 16:56 ` Valerio G
0 siblings, 0 replies; 4+ messages in thread
From: Valerio G @ 2019-06-05 16:56 UTC (permalink / raw)
To: Greg KH; +Cc: devel, linux-kernel
Hi,
Thanks for the feedback. I re-submitted the patch as v2.
best,
Valerio
Il 05/06/19 18:11, Greg KH ha scritto:
> On Wed, Jun 05, 2019 at 05:57:11PM +0200, Valerio Genovese wrote:
>> This was reported by sparse:
>> drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:39:7: warning: symbol 'kpc_dma_add_device
>> ' was not declared. Should it be static?
>>
>> Signed-off-by: Valerio Genovese <valerio.click@gmail.com>
>> ---
>> drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
>> index ee47f43e71cf..19e88c3bc13f 100644
>> --- a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
>> +++ b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.h
>> @@ -56,6 +56,7 @@ struct dev_private_data {
>> };
>>
>> struct kpc_dma_device *kpc_dma_lookup_device(int minor);
>> +void kpc_dma_add_device(struct kpc_dma_device *ldev);
>>
>> extern const struct file_operations kpc_dma_fops;
>>
>
> This is not how you fix this issue.
>
> Look at the warning given to you. Think about your C programming
> knowledge and remember what the 'static' keyword is and does.
>
> Then fix the issue properly.
>
> thanks,
>
> greg k-h
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-05 16:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-05 15:57 [PATCH] staging: kpc2000: kpc_dma: fix symbol 'kpc_dma_add_device' was not declared Valerio Genovese
2019-06-05 16:09 ` Matt Sickler
2019-06-05 16:11 ` Greg KH
2019-06-05 16:56 ` Valerio G
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).