net: ipa: use data space for command opcodes
authorAlex Elder <elder@linaro.org>
Sun, 22 May 2022 00:32:23 +0000 (19:32 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 May 2022 19:46:12 +0000 (20:46 +0100)
The 64-bit data field in a transaction is not used for commands.
And the opcode array is *only* used for commands.  They're
(currently) the same size; save a little space in the transaction
structure by enclosing the two fields in a union.

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

index 99ce2cba0dc3c0a8933ca804f0c8b975cfa41104..020c3b32de1d7cb8dbd92e154a74c43c0427e663 100644 (file)
@@ -60,8 +60,10 @@ struct gsi_trans {
        u8 used;                        /* # entries used in sgl[] */
        u32 len;                        /* total # bytes across sgl[] */
 
-       void *data;
-       u8 cmd_opcode[IPA_COMMAND_TRANS_TRE_MAX];
+       union {
+               void *data;
+               u8 cmd_opcode[IPA_COMMAND_TRANS_TRE_MAX];
+       };
        struct scatterlist *sgl;
        enum dma_data_direction direction;