The comment suggested that gb_loopback_async_wait_all() was redundant because the connection is disabled earlier. Disabling a Greybus connection prevents new requests but does not guarantee that previously submitted asynchronous operations have completed. The wait is still required for safe teardown.
Remove the incorrect FIXME and replace it with a descriptive comment.
Signed-off-by: Ayaan Mirza Baig ayaanmirzabaig85@gmail.com --- drivers/staging/greybus/loopback.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index 1f19323b0e1a..0a5827e1a8c7 100644 --- a/drivers/staging/greybus/loopback.c +++ b/drivers/staging/greybus/loopback.c @@ -1110,11 +1110,7 @@ static void gb_loopback_disconnect(struct gb_bundle *bundle) gb_connection_latency_tag_disable(gb->connection); debugfs_remove(gb->file);
- /* - * FIXME: gb_loopback_async_wait_all() is redundant now, as connection - * is disabled at the beginning and so we can't have any more - * incoming/outgoing requests. - */ + /* Ensure all outstanding async loopback requests have completed */ gb_loopback_async_wait_all(gb);
spin_lock_irqsave(&gb_dev.lock, flags);