staging: gdm724x: use netdev_err() instead of pr_err()
authorLourdes Pedrajas <lu@pplo.net>
Fri, 20 Mar 2020 00:39:47 +0000 (01:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Mar 2020 14:07:45 +0000 (15:07 +0100)
use netdev_err() which is a message printing function specific for network
devices instead of pr_err(), in function netlink_send().

Signed-off-by: Lourdes Pedrajas <lu@pplo.net>
Link: https://lore.kernel.org/r/20200320003947.31726-1-lu@pplo.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm724x/gdm_lte.c
drivers/staging/gdm724x/netlink_k.c
drivers/staging/gdm724x/netlink_k.h

index db11498f6fc7d99342c22eb5cc41504da6a34842..354727f0a1fc3709b7d32d3a682ec36c6db24dd2 100644 (file)
@@ -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,
index 92440c3f055b02ca1b3190f84819ef02b7c77c34..7902e52a699bcc0e888b6c0ec103a71457702e42 100644 (file)
@@ -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,8 +119,8 @@ 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",
-                      group, type, len, ret);
+               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;
 
index c9e1d3b2d54ff721b94975c7ab14f20e043a1365..d42eea9bea3ec5719be32dfbc5f0e614e2319535 100644 (file)
@@ -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_ */