Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a860f91 authored by Chuhong Yuan's avatar Chuhong Yuan Committed by David S. Miller
Browse files

liquidio: Replace vmalloc + memset with vzalloc



Use vzalloc and vzalloc_node instead of using vmalloc and
vmalloc_node and then zeroing the allocated memory by
memset 0.
This simplifies the code.

Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 666a3d6e
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -218,15 +218,13 @@ int octeon_setup_iq(struct octeon_device *oct,
		return 0;
	}
	oct->instr_queue[iq_no] =
	    vmalloc_node(sizeof(struct octeon_instr_queue), numa_node);
	    vzalloc_node(sizeof(struct octeon_instr_queue), numa_node);
	if (!oct->instr_queue[iq_no])
		oct->instr_queue[iq_no] =
		    vmalloc(sizeof(struct octeon_instr_queue));
		    vzalloc(sizeof(struct octeon_instr_queue));
	if (!oct->instr_queue[iq_no])
		return 1;

	memset(oct->instr_queue[iq_no], 0,
	       sizeof(struct octeon_instr_queue));

	oct->instr_queue[iq_no]->q_index = q_index;
	oct->instr_queue[iq_no]->app_ctx = app_ctx;