qed: simplify chain allocation with init params struct
To simplify qed_chain_alloc() prototype and call sites, introduce struct qed_chain_init_params to specify chain params, and pass a pointer to filled struct to the actual qed_chain_alloc() instead of a long list of separate arguments. Signed-off-by: Alexander Lobakin <alobakin@marvell.com> Signed-off-by: Igor Russkikh <irusskikh@marvell.com> Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c3a321b06a
commit
b6db3f71c9
@@ -948,13 +948,8 @@ struct qed_common_ops {
|
||||
u8 dp_level);
|
||||
|
||||
int (*chain_alloc)(struct qed_dev *cdev,
|
||||
enum qed_chain_use_mode intended_use,
|
||||
enum qed_chain_mode mode,
|
||||
enum qed_chain_cnt_type cnt_type,
|
||||
u32 num_elems,
|
||||
size_t elem_size,
|
||||
struct qed_chain *p_chain,
|
||||
struct qed_chain_ext_pbl *ext_pbl);
|
||||
struct qed_chain *chain,
|
||||
struct qed_chain_init_params *params);
|
||||
|
||||
void (*chain_free)(struct qed_dev *cdev,
|
||||
struct qed_chain *p_chain);
|
||||
|
Reference in New Issue
Block a user