Skip to contentSkip to conversation

Yama: mark function as static

PATCH In review Mukesh Ojha 2 participants 2 messages Mar 27, 2019 – Apr 10, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Yama: mark function as static

Sparse complains yama_task_prctl can be static. Fix it by making it static.

---
 security/yama/yama_lsm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/yama/yama_lsm.c +1 -1
index 57cc607..9c5a15b 100644
@@ -222,7 +222,7 @@ void yama_task_free(struct task_struct *task)
  * Return 0 on success, -ve on error.  -ENOSYS is returned when Yama
  * does not handle the given option.
  */
-int yama_task_prctl(int option, unsigned long arg2, unsigned long arg3,
+static int yama_task_prctl(int option, unsigned long arg2, unsigned long arg3,
 			   unsigned long arg4, unsigned long arg5)
 {
 	int rc = -ENOSYS;
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center,
Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
maintainer
#1 lore raw
Quoted 4 lines · Mukesh Ojha

Sparse complains yama_task_prctl can be static. Fix it by making it static.

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general

Signature · 2 lines
James Morris
<[email protected]>