net: ipa: get rid of ipa_cmd_info->direction
authorAlex Elder <elder@linaro.org>
Sun, 22 May 2022 00:32:20 +0000 (19:32 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 May 2022 19:46:12 +0000 (20:46 +0100)
The direction field of the ipa_cmd_info structure is set, but never
used.  It seems it might have been used for the DMA_SHARED_MEM
immediate command, but the DIRECTION flag is set based on the value
of the passed-in direction flag there.

Anyway, remove this unused field from the ipa_cmd_info structure.
This is done as a separate patch to make it very obvious that it's
not required.

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

index bf31ef3d56adc9d4111ef5870fbdec7ce4e9597a..cf8ee42373547813cd87a9df0819a96a880acc79 100644 (file)
@@ -413,7 +413,6 @@ void gsi_trans_cmd_add(struct gsi_trans *trans, void *buf, u32 size,
                       dma_addr_t addr, enum dma_data_direction direction,
                       enum ipa_cmd_opcode opcode)
 {
-       struct ipa_cmd_info *info;
        u32 which = trans->used++;
        struct scatterlist *sg;
 
@@ -438,9 +437,7 @@ void gsi_trans_cmd_add(struct gsi_trans *trans, void *buf, u32 size,
        sg_dma_address(sg) = addr;
        sg_dma_len(sg) = size;
 
-       info = &trans->info[which];
-       info->opcode = opcode;
-       info->direction = direction;
+       trans->info[which].opcode = opcode;
 }
 
 /* Add a page transfer to a transaction.  It will fill the only TRE. */
index 05ed7e42e184205e252288e7c568ff0bd61ead92..d4dbe2ce96dcd898db1f07380aab32ea300f5ca5 100644 (file)
@@ -50,11 +50,9 @@ enum ipa_cmd_opcode {
  * struct ipa_cmd_info - information needed for an IPA immediate command
  *
  * @opcode:    The command opcode.
- * @direction: Direction of data transfer for DMA commands
  */
 struct ipa_cmd_info {
        enum ipa_cmd_opcode opcode;
-       enum dma_data_direction direction;
 };
 
 /**