Hi, On 2/15/2016 10:11 PM, Christoph Hellwig wrote:
We only use the pointer when processing regular iSER commands, and it then always points to the struct iser_cmd that contains the TX descriptor. Remove it and rely on container_of to save a little space and avoid a pointer that is updated multiple times per processed command. Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- drivers/infiniband/ulp/isert/ib_isert.c | 14 ++++++-------- drivers/infiniband/ulp/isert/ib_isert.h | 1 - 2 files changed, 6 insertions(+), 9 deletions(-)
maybe we can define it once as: static inline struct isert_cmd * isert_tx_to_cmd(iser_tx_desc *tx_desc) { return container_of(tx_desc, struct isert_cmd, tx_desc); } in the .h file ? cheers, Max. -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html