提交 2579bce4 编写于 作者: M Madalin Bucur 提交者: David S. Miller

fsl/fman: remove unused struct member

Remove unused struct member second_largest_buf_size. Also, an out of
bounds access would have occurred in the removed code if there was only
one buffer pool in use.
Signed-off-by: NMadalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 060ad66f
...@@ -435,7 +435,6 @@ struct fman_port_cfg { ...@@ -435,7 +435,6 @@ struct fman_port_cfg {
struct fman_port_rx_pools_params { struct fman_port_rx_pools_params {
u8 num_of_pools; u8 num_of_pools;
u16 second_largest_buf_size;
u16 largest_buf_size; u16 largest_buf_size;
}; };
...@@ -946,8 +945,6 @@ static int set_ext_buffer_pools(struct fman_port *port) ...@@ -946,8 +945,6 @@ static int set_ext_buffer_pools(struct fman_port *port)
port->rx_pools_params.num_of_pools = ext_buf_pools->num_of_pools_used; port->rx_pools_params.num_of_pools = ext_buf_pools->num_of_pools_used;
port->rx_pools_params.largest_buf_size = port->rx_pools_params.largest_buf_size =
sizes_array[ordered_array[ext_buf_pools->num_of_pools_used - 1]]; sizes_array[ordered_array[ext_buf_pools->num_of_pools_used - 1]];
port->rx_pools_params.second_largest_buf_size =
sizes_array[ordered_array[ext_buf_pools->num_of_pools_used - 2]];
/* FMBM_RMPD reg. - pool depletion */ /* FMBM_RMPD reg. - pool depletion */
if (buf_pool_depletion->pools_grp_mode_enable) { if (buf_pool_depletion->pools_grp_mode_enable) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册