Commit 79530291 authored by Lourdes Pedrajas's avatar Lourdes Pedrajas Committed by Greg Kroah-Hartman
Browse files

staging: gdm724x: use netdev_err() instead of pr_err()



use netdev_err() which is a message printing function specific for network
devices instead of pr_err(), in function netlink_send().

Signed-off-by: default avatarLourdes Pedrajas <lu@pplo.net>
Link: https://lore.kernel.org/r/20200320003947.31726-1-lu@pplo.net


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 04ff8b51
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -513,7 +513,7 @@ static int gdm_lte_event_send(struct net_device *dev, char *buf, int len)

	length = gdm_dev16_to_cpu(phy_dev->get_endian(phy_dev->priv_dev),
				  hci->len) + HCI_HEADER_SIZE;
	return netlink_send(lte_event.sock, idx, 0, buf, length);
	return netlink_send(lte_event.sock, idx, 0, buf, length, dev);
}

static void gdm_lte_event_rcv(struct net_device *dev, u16 type,
+4 −3
Original line number Diff line number Diff line
@@ -89,7 +89,8 @@ struct sock *netlink_init(int unit,
	return sock;
}

int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len)
int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len,
		 struct net_device *dev)
{
	static u32 seq;
	struct sk_buff *skb = NULL;
@@ -118,7 +119,7 @@ int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len)
		return len;

	if (ret != -ESRCH)
		pr_err("nl broadcast g=%d, t=%d, l=%d, r=%d\n",
		netdev_err(dev, "nl broadcast g=%d, t=%d, l=%d, r=%d\n",
			   group, type, len, ret);
	else if (netlink_has_listeners(sock, group + 1))
		return -EAGAIN;
+2 −1
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
struct sock *netlink_init(int unit,
			  void (*cb)(struct net_device *dev,
				     u16 type, void *msg, int len));
int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len);
int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len,
		 struct net_device *dev);

#endif /* _NETLINK_K_H_ */