diff options
author | David S. Miller <davem@davemloft.net> | 2020-02-29 21:37:03 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-29 21:37:03 -0800 |
commit | 68e2c37690b0da7539cfa2928bf1e4f50d88a1bb (patch) | |
tree | b0be89db312dca6289579c56a8259177aa1c2c6b /drivers | |
parent | 892e09153fa3564fcbf9f422760b61eba48c123e (diff) | |
parent | e0a4b99773d3d8d3fb40087805f8fd858a23e582 (diff) |
Merge branch 'hsr-several-code-cleanup-for-hsr-module'
Taehee Yoo says:
====================
hsr: several code cleanup for hsr module
This patchset is to clean up hsr module code.
1. The first patch is to use debugfs_remove_recursive().
If it uses debugfs_remove_recursive() instead of debugfs_remove(),
hsr_priv() doesn't need to have "node_tbl_file" pointer variable.
2. The second patch is to use extack error message.
If HSR uses the extack instead of netdev_info(), users can get
error messages immediately without any checking the kernel message.
3. The third patch is to use netdev_err() instead of WARN_ONCE().
When a packet is being sent, hsr_addr_subst_dest() is called and
it tries to find the node with the ethernet destination address.
If it couldn't find a node, it warns with WARN_ONCE().
But, using WARN_ONCE() is a little bit overdoing.
So, in this patch, netdev_err() is used instead.
4. The fourth patch is to remove unnecessary rcu_read_{lock/unlock}().
There are some rcu_read_{lock/unlock}() in hsr module and some of
them are unnecessary. In this patch,
these unnecessary rcu_read_{lock/unlock}() will be removed.
5. The fifth patch is to use upper/lower device infrastructure.
netdev_upper_dev_link() is useful to manage lower/upper interfaces.
And this function internally validates looping, maximum depth.
If hsr module uses upper/lower device infrastructure,
it can prevent these above problems.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions