]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: ipa: rework last transaction determination
authorAlex Elder <elder@linaro.org>
Fri, 2 Sep 2022 21:02:13 +0000 (16:02 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Sep 2022 11:47:01 +0000 (12:47 +0100)
commitb2abe33d23cfaea6cd3f8335a1ee08c480512c6f
treef575eb1f75ac9e96e986ab188a729bc6d3df793e
parent599566c1c369205286b1a22e1b3c2e9dea0e3744
net: ipa: rework last transaction determination

When quiescing a channel, we find the "last" transaction, which is
the latest one to have been allocated.  (New transaction allocation
will have been prevented by the time this is called.)

Currently we do this by looking for the first non-empty transaction
list in each state, then return the last entry from that last.
Instead, determine the last entry in each list (if any) and return
that entry if found.

Temporarily (locally) introduce list_last_entry_or_null() as a
helper for this, mirroring list_first_entry_or_null().  This macro
definition will be removed by an upcoming patch.

Remove the temporary warnings added by the previous commit.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/gsi.c
drivers/net/ipa/gsi_private.h
drivers/net/ipa/gsi_trans.c