summaryrefslogtreecommitdiff
path: root/drivers/net/ipa/gsi_private.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2022-09-06 20:19:38 +0300
committerDavid S. Miller <davem@davemloft.net>2022-09-09 13:45:25 +0300
commit0c126ec3ddcc81448315e73d196a5a2f42cfd6b4 (patch)
tree4eab0be4c2e40f6f01cca7587f9bd80eecd19e71 /drivers/net/ipa/gsi_private.h
parent6fff926141416a971fcdf7fb71fff404ee53ad47 (diff)
downloadlinux-0c126ec3ddcc81448315e73d196a5a2f42cfd6b4.tar.xz
net: ipa: always use transaction IDs instead of lists
In gsi_channel_trans_complete(), use the completed and pending IDs to determine whether there are any transactions in completed state. Similarly, in gsi_channel_trans_cancel_pending(), use the pending and committed IDs to mark pending transactions cancelled. Rearrange the logic a bit there for a simpler result. This removes the only user of list_last_entry_or_null(), so get rid of that macro. 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>
Diffstat (limited to 'drivers/net/ipa/gsi_private.h')
-rw-r--r--drivers/net/ipa/gsi_private.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/net/ipa/gsi_private.h b/drivers/net/ipa/gsi_private.h
index 51bbc7a40dc2..0b2516fa21b5 100644
--- a/drivers/net/ipa/gsi_private.h
+++ b/drivers/net/ipa/gsi_private.h
@@ -17,20 +17,6 @@ struct gsi_channel;
#define GSI_RING_ELEMENT_SIZE 16 /* bytes; must be a power of 2 */
/**
- * list_last_entry_or_null - get the last element from a list
- * @ptr: the list head to take the element from.
- * @type: the type of the struct this is embedded in.
- * @member: the name of the list_head within the struct.
- *
- * Note that if the list is empty, it returns NULL.
- */
-#define list_last_entry_or_null(ptr, type, member) ({ \
- struct list_head *head__ = (ptr); \
- struct list_head *pos__ = READ_ONCE(head__->prev); \
- pos__ != head__ ? list_entry(pos__, type, member) : NULL; \
-})
-
-/**
* gsi_trans_move_complete() - Mark a GSI transaction completed
* @trans: Transaction to commit
*/