mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
IB/rxe: Use DEFINE_SPINLOCK() for spinlock
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Leon Romanosky <[email protected]> Reviewed-by: Moni Shoua <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
This commit is contained in:
parent
a0fa72683e
commit
4ac4707102
1 changed files with 1 additions and 5 deletions
|
|
@ -46,7 +46,7 @@
|
|||
#include "rxe_loc.h"
|
||||
|
||||
static LIST_HEAD(rxe_dev_list);
|
||||
static spinlock_t dev_list_lock; /* spinlock for device list */
|
||||
static DEFINE_SPINLOCK(dev_list_lock); /* spinlock for device list */
|
||||
|
||||
struct rxe_dev *net_to_rxe(struct net_device *ndev)
|
||||
{
|
||||
|
|
@ -663,8 +663,6 @@ struct notifier_block rxe_net_notifier = {
|
|||
|
||||
int rxe_net_ipv4_init(void)
|
||||
{
|
||||
spin_lock_init(&dev_list_lock);
|
||||
|
||||
recv_sockets.sk4 = rxe_setup_udp_tunnel(&init_net,
|
||||
htons(ROCE_V2_UDP_DPORT), false);
|
||||
if (IS_ERR(recv_sockets.sk4)) {
|
||||
|
|
@ -680,8 +678,6 @@ int rxe_net_ipv6_init(void)
|
|||
{
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
|
||||
spin_lock_init(&dev_list_lock);
|
||||
|
||||
recv_sockets.sk6 = rxe_setup_udp_tunnel(&init_net,
|
||||
htons(ROCE_V2_UDP_DPORT), true);
|
||||
if (IS_ERR(recv_sockets.sk6)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue