]> git.baikalelectronics.ru Git - kernel.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)
commitbbf099e1dab0fae363fae0baf9398f7ca7512501
treef575eb1f75ac9e96e986ab188a729bc6d3df793e
parent68d6e0b150ca17ce347cce1ab28c5884aaa4f8d9
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