From 5bae65fcbe922be2aabe116cdf4b5c7780b9ff1b Mon Sep 17 00:00:00 2001 From: John Johansen Date: Tue, 19 Mar 2024 05:33:08 -0700 Subject: [PATCH] UBUNTU: SAUCE: apparmor4.0.0 [90/90]: apparmor: Fix notify build warnings BugLink: http://bugs.launchpad.net/bugs/2028253 Remove the static and unused build warnings from notify. Signed-off-by: John Johansen (cherry picked from commit a22e22ecf2fd281c16b1c62976489944088bc689 https://git.launchpad.net/~apparmor-dev/ubuntu-kernel-next) Signed-off-by: Paolo Pisati --- security/apparmor/notify.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/security/apparmor/notify.c b/security/apparmor/notify.c index bf6857bc8a56..374fe897374f 100644 --- a/security/apparmor/notify.c +++ b/security/apparmor/notify.c @@ -70,6 +70,7 @@ static void __list_append_held(struct list_head *lh, struct aa_knotif *knotif) knotif->flags |= KNOTIF_ON_LIST; } +/* static void __list_push_held(struct list_head *lh, struct aa_knotif *knotif) { AA_BUG(!lh); @@ -78,6 +79,7 @@ static void __list_push_held(struct list_head *lh, struct aa_knotif *knotif) list_add_entry(knotif, lh, list); knotif->flags |= KNOTIF_ON_LIST; } +*/ static void __listener_add_knotif(struct aa_listener *listener, struct aa_knotif *knotif) @@ -288,7 +290,8 @@ out: } // don't drop refcounts -struct aa_knotif *listener_pop_and_hold_knotif(struct aa_listener *listener) +static struct aa_knotif * +listener_pop_and_hold_knotif(struct aa_listener *listener) { struct aa_knotif *knotif = NULL; @@ -303,20 +306,22 @@ struct aa_knotif *listener_pop_and_hold_knotif(struct aa_listener *listener) } // require refcounts held -void listener_push_held_knotif(struct aa_listener *listener, - struct aa_knotif *knotif) +/* +static void listener_push_held_knotif(struct aa_listener *listener, + struct aa_knotif *knotif) { spin_lock(&listener->lock); - /* listener ref held from pop and hold */ + // listener ref held from pop and hold __list_push_held(&listener->notifications, knotif); spin_unlock(&listener->lock); wake_up_interruptible_poll(&listener->wait, EPOLLIN | EPOLLRDNORM); } +*/ // require refcounts held // list of knotifs waiting for response -void listener_append_held_user_pending(struct aa_listener *listener, - struct aa_knotif *knotif) +static void listener_append_held_user_pending(struct aa_listener *listener, + struct aa_knotif *knotif) { spin_lock(&listener->lock); __list_append_held(&listener->pending, knotif); @@ -326,8 +331,8 @@ void listener_append_held_user_pending(struct aa_listener *listener, } // don't drop refcounts -struct aa_knotif *__del_and_hold_user_pending(struct aa_listener *listener, - u64 id) +static struct aa_knotif * +__del_and_hold_user_pending(struct aa_listener *listener, u64 id) { struct aa_knotif *knotif;