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 <john.johansen@canonical.com>
(cherry picked from commit a22e22ecf2fd281c16b1c62976489944088bc689
https://git.launchpad.net/~apparmor-dev/ubuntu-kernel-next)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
This commit is contained in:
John Johansen
2024-03-19 05:33:08 -07:00
committed by Paolo Pisati
parent 938ac0b38c
commit 5bae65fcbe
+13 -8
View File
@@ -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;