list: fix order of arguments for hlist_add_after(_rcu)
All other add functions for lists have the new item as first argument and the position where it is added as second argument. This was changed for no good reason in this function and makes using it unnecessary confusing. The name was changed to hlist_add_behind() to cause unconverted code to generate a compile error instead of using the wrong parameter order. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Ken Helias <kenhelias@firemail.de> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> [intel driver bits] Cc: Hugh Dickins <hughd@google.com> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
bc18dd335a
commit
1d023284c3
@@ -1948,7 +1948,7 @@ static int i40e_update_ethtool_fdir_entry(struct i40e_vsi *vsi,
|
||||
|
||||
/* add filter to the list */
|
||||
if (parent)
|
||||
hlist_add_after(&parent->fdir_node, &input->fdir_node);
|
||||
hlist_add_behind(&input->fdir_node, &parent->fdir_node);
|
||||
else
|
||||
hlist_add_head(&input->fdir_node,
|
||||
&pf->fdir_filter_list);
|
||||
|
@@ -2517,7 +2517,7 @@ static int ixgbe_update_ethtool_fdir_entry(struct ixgbe_adapter *adapter,
|
||||
|
||||
/* add filter to the list */
|
||||
if (parent)
|
||||
hlist_add_after(&parent->fdir_node, &input->fdir_node);
|
||||
hlist_add_behind(&input->fdir_node, &parent->fdir_node);
|
||||
else
|
||||
hlist_add_head(&input->fdir_node,
|
||||
&adapter->fdir_filter_list);
|
||||
|
Reference in New Issue
Block a user