lkml.org 
[lkml]   [2016]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/2] regulator: dbx500: add missing header dependencies
Date
On Friday, September 23, 2016 8:50:10 PM CEST Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:
> drivers/regulator/dbx500-prcmu.c:158:27: warning: no previous prototype for 'dbx500_regulator_testcase' [-Wmissing-prototypes]
>
> In fact, this function is not declared in any file, but should be
> declared in a header file. thus can be recognized in other file.
>
> So this patch adds the declaration into
> drivers/regulator/dbx500-prcmu.h.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
>

I'm always suspicious of a patch that only adds a declaration,
as that tends to mean that no other caller ever existed. In this
case, there is an empty "__weak" function definition and it
is called from the driver itself, but there is no other non-weak
definition. If there was another definition, it would probably
be wrong, so I'd just remove the function completely and not
call it.

Arnd

\
 
 \ /
  Last update: 2016-09-23 15:46    [W:0.030 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site