diff mbox series

[15/19] powerpc: Add missing prototype

Message ID 20180322202007.23088-16-malat@debian.org (mailing list archive)
State Superseded
Headers show
Series powerpc/ppc32: make W=1 compilation errors free | expand

Commit Message

Mathieu Malaterre March 22, 2018, 8:20 p.m. UTC
Add one missing prototype for function rh_dump_blk. Fix warning treated as
error in W=1:

  arch/powerpc/lib/rheap.c:740:6: error: no previous prototype for ‘rh_dump_blk’ [-Werror=missing-prototypes]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 arch/powerpc/include/asm/rheap.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Christophe Leroy March 23, 2018, 12:20 p.m. UTC | #1
Le 22/03/2018 à 21:20, Mathieu Malaterre a écrit :
> Add one missing prototype for function rh_dump_blk. Fix warning treated as
> error in W=1:
> 
>    arch/powerpc/lib/rheap.c:740:6: error: no previous prototype for ‘rh_dump_blk’ [-Werror=missing-prototypes]
> 
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
>   arch/powerpc/include/asm/rheap.h | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/arch/powerpc/include/asm/rheap.h b/arch/powerpc/include/asm/rheap.h
> index 172381769cfc..e75d96de19a0 100644
> --- a/arch/powerpc/include/asm/rheap.h
> +++ b/arch/powerpc/include/asm/rheap.h
> @@ -83,6 +83,9 @@ extern int rh_get_stats(rh_info_t * info, int what, int max_stats,
>   /* Simple dump of remote heap info */
>   extern void rh_dump(rh_info_t * info);
>   
> +/* Simple dump of remote info block */
> +extern void rh_dump_blk(rh_info_t *info, rh_block_t *blk);
> +

Only used in one place, should be static

Christophe

>   /* Set owner of taken block */
>   extern int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner);
>   
> 

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
Mathieu Malaterre March 28, 2018, 7:13 p.m. UTC | #2
On Fri, Mar 23, 2018 at 1:20 PM, christophe leroy
<christophe.leroy@c-s.fr> wrote:
>
>
> Le 22/03/2018 à 21:20, Mathieu Malaterre a écrit :
>>
>> Add one missing prototype for function rh_dump_blk. Fix warning treated as
>> error in W=1:
>>
>>    arch/powerpc/lib/rheap.c:740:6: error: no previous prototype for
>> ‘rh_dump_blk’ [-Werror=missing-prototypes]
>>
>> Signed-off-by: Mathieu Malaterre <malat@debian.org>
>> ---
>>   arch/powerpc/include/asm/rheap.h | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/arch/powerpc/include/asm/rheap.h
>> b/arch/powerpc/include/asm/rheap.h
>> index 172381769cfc..e75d96de19a0 100644
>> --- a/arch/powerpc/include/asm/rheap.h
>> +++ b/arch/powerpc/include/asm/rheap.h
>> @@ -83,6 +83,9 @@ extern int rh_get_stats(rh_info_t * info, int what, int
>> max_stats,
>>   /* Simple dump of remote heap info */
>>   extern void rh_dump(rh_info_t * info);
>>   +/* Simple dump of remote info block */
>> +extern void rh_dump_blk(rh_info_t *info, rh_block_t *blk);
>> +
>
>
> Only used in one place, should be static

Well here is what I see over here:

$ git grep rh_dump_blk
...
arch/powerpc/lib/rheap.c:EXPORT_SYMBOL_GPL(rh_dump_blk);



> Christophe
>
>>   /* Set owner of taken block */
>>   extern int rh_set_owner(rh_info_t * info, unsigned long start, const
>> char *owner);
>>
>
>
> ---
> L'absence de virus dans ce courrier électronique a été vérifiée par le
> logiciel antivirus Avast.
> https://www.avast.com/antivirus
>
Christophe Leroy March 29, 2018, 4:02 p.m. UTC | #3
Mathieu Malaterre <malat@debian.org> a écrit :

> On Fri, Mar 23, 2018 at 1:20 PM, christophe leroy
> <christophe.leroy@c-s.fr> wrote:
>>
>>
>> Le 22/03/2018 à 21:20, Mathieu Malaterre a écrit :
>>>
>>> Add one missing prototype for function rh_dump_blk. Fix warning treated as
>>> error in W=1:
>>>
>>>    arch/powerpc/lib/rheap.c:740:6: error: no previous prototype for
>>> ‘rh_dump_blk’ [-Werror=missing-prototypes]
>>>
>>> Signed-off-by: Mathieu Malaterre <malat@debian.org>
>>> ---
>>>   arch/powerpc/include/asm/rheap.h | 3 +++
>>>   1 file changed, 3 insertions(+)
>>>
>>> diff --git a/arch/powerpc/include/asm/rheap.h
>>> b/arch/powerpc/include/asm/rheap.h
>>> index 172381769cfc..e75d96de19a0 100644
>>> --- a/arch/powerpc/include/asm/rheap.h
>>> +++ b/arch/powerpc/include/asm/rheap.h
>>> @@ -83,6 +83,9 @@ extern int rh_get_stats(rh_info_t * info, int what, int
>>> max_stats,
>>>   /* Simple dump of remote heap info */
>>>   extern void rh_dump(rh_info_t * info);
>>>   +/* Simple dump of remote info block */
>>> +extern void rh_dump_blk(rh_info_t *info, rh_block_t *blk);
>>> +
>>
>>
>> Only used in one place, should be static
>
> Well here is what I see over here:
>
> $ git grep rh_dump_blk
> ...
> arch/powerpc/lib/rheap.c:EXPORT_SYMBOL_GPL(rh_dump_blk);

If it was really used by anybody in a module, it would already be in a  
.h so I think we should simply delete the function

Christophe

>
>
>
>> Christophe
>>
>>>   /* Set owner of taken block */
>>>   extern int rh_set_owner(rh_info_t * info, unsigned long start, const
>>> char *owner);
>>>
>>
>>
>> ---
>> L'absence de virus dans ce courrier électronique a été vérifiée par le
>> logiciel antivirus Avast.
>> https://www.avast.com/antivirus
>>
Mathieu Malaterre April 4, 2018, 8:18 p.m. UTC | #4
On Thu, Mar 29, 2018 at 6:02 PM, LEROY Christophe
<christophe.leroy@c-s.fr> wrote:
> Mathieu Malaterre <malat@debian.org> a écrit :
>
>
>> On Fri, Mar 23, 2018 at 1:20 PM, christophe leroy
>> <christophe.leroy@c-s.fr> wrote:
>>>
>>>
>>>
>>> Le 22/03/2018 à 21:20, Mathieu Malaterre a écrit :
>>>>
>>>>
>>>> Add one missing prototype for function rh_dump_blk. Fix warning treated
>>>> as
>>>> error in W=1:
>>>>
>>>>    arch/powerpc/lib/rheap.c:740:6: error: no previous prototype for
>>>> ‘rh_dump_blk’ [-Werror=missing-prototypes]
>>>>
>>>> Signed-off-by: Mathieu Malaterre <malat@debian.org>
>>>> ---
>>>>   arch/powerpc/include/asm/rheap.h | 3 +++
>>>>   1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/arch/powerpc/include/asm/rheap.h
>>>> b/arch/powerpc/include/asm/rheap.h
>>>> index 172381769cfc..e75d96de19a0 100644
>>>> --- a/arch/powerpc/include/asm/rheap.h
>>>> +++ b/arch/powerpc/include/asm/rheap.h
>>>> @@ -83,6 +83,9 @@ extern int rh_get_stats(rh_info_t * info, int what,
>>>> int
>>>> max_stats,
>>>>   /* Simple dump of remote heap info */
>>>>   extern void rh_dump(rh_info_t * info);
>>>>   +/* Simple dump of remote info block */
>>>> +extern void rh_dump_blk(rh_info_t *info, rh_block_t *blk);
>>>> +
>>>
>>>
>>>
>>> Only used in one place, should be static
>>
>>
>> Well here is what I see over here:
>>
>> $ git grep rh_dump_blk
>> ...
>> arch/powerpc/lib/rheap.c:EXPORT_SYMBOL_GPL(rh_dump_blk);
>
>
> If it was really used by anybody in a module, it would already be in a .h so
> I think we should simply delete the function
>

Sent a v3 without the extern keyword. I did not feel bold enough to
remove completely a function. Could one of the maintainers confirm
removal of the function ?

> Christophe
>
>
>>
>>
>>
>>> Christophe
>>>
>>>>   /* Set owner of taken block */
>>>>   extern int rh_set_owner(rh_info_t * info, unsigned long start, const
>>>> char *owner);
>>>>
>>>
>>>
>>> ---
>>> L'absence de virus dans ce courrier électronique a été vérifiée par le
>>> logiciel antivirus Avast.
>>> https://www.avast.com/antivirus
>>>
>
>
diff mbox series

Patch

diff --git a/arch/powerpc/include/asm/rheap.h b/arch/powerpc/include/asm/rheap.h
index 172381769cfc..e75d96de19a0 100644
--- a/arch/powerpc/include/asm/rheap.h
+++ b/arch/powerpc/include/asm/rheap.h
@@ -83,6 +83,9 @@  extern int rh_get_stats(rh_info_t * info, int what, int max_stats,
 /* Simple dump of remote heap info */
 extern void rh_dump(rh_info_t * info);
 
+/* Simple dump of remote info block */
+extern void rh_dump_blk(rh_info_t *info, rh_block_t *blk);
+
 /* Set owner of taken block */
 extern int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner);