[RFC PATCH ammarfaizi2-block] ANDROID: net: paranoid: commoncap: __cap_capable() can be static

From: kernel test robot
Date: Thu Mar 03 2022 - 01:12:54 EST


security/commoncap.c:75:5: warning: symbol '__cap_capable' was not declared. Should it be static?

Fixes: 2b02b4ab89b9 ("ANDROID: net: paranoid: commoncap: Begin to warn users of implicit PARANOID_NETWORK capability grants")
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: kernel test robot <lkp@xxxxxxxxx>
---
security/commoncap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/commoncap.c b/security/commoncap.c
index 2ed79a834a965..f38709ba26317 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -72,7 +72,7 @@ static void warn_setuid_and_fcaps_mixed(const char *fname)
* cap_has_capability() returns 0 when a task has a capability, but the
* kernel's capable() and has_capability() returns 1 for this case.
*/
-int __cap_capable(const struct cred *cred, struct user_namespace *targ_ns,
+static int __cap_capable(const struct cred *cred, struct user_namespace *targ_ns,
int cap, int audit)
{
struct user_namespace *ns = targ_ns;