From: Andy Grover <agrover@xxxxxxxxxx> Instead of passing as void * and then casting to sg, we can just pass it as a struct scatterlist*. Signed-off-by: Andy Grover <agrover@xxxxxxxxxx> Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> --- drivers/target/target_core_transport.c | 3 +-- include/target/target_core_transport.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 9bbc626..ccc5319 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -4312,7 +4312,7 @@ static int transport_map_sg_to_mem( int transport_map_mem_to_sg( struct se_task *task, struct list_head *se_mem_list, - void *in_mem, + struct scatterlist *sg, struct se_mem *in_se_mem, struct se_mem **out_se_mem, u32 *se_mem_cnt, @@ -4320,7 +4320,6 @@ int transport_map_mem_to_sg( { struct se_cmd *se_cmd = task->task_se_cmd; struct se_mem *se_mem = in_se_mem; - struct scatterlist *sg = (struct scatterlist *)in_mem; u32 task_size = task->task_size, sg_no = 0; if (!sg) { diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index acd5914..4bbd88b 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h @@ -184,7 +184,7 @@ extern void transport_generic_free_cmd(struct se_cmd *, int, int, int); extern void transport_generic_wait_for_cmds(struct se_cmd *, int); extern int transport_init_task_sg(struct se_task *, struct se_mem *, u32); extern int transport_map_mem_to_sg(struct se_task *, struct list_head *, - void *, struct se_mem *, + struct scatterlist *, struct se_mem *, struct se_mem **, u32 *, u32 *); extern void transport_do_task_sg_chain(struct se_cmd *); extern void transport_generic_process_write(struct se_cmd *); -- 1.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html