Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: ch9200: use __func__ in debug message

Use __func__ to print the function name instead of hard coded string.

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Chen Zhou and committed by
David S. Miller
e64dec83 58cf542a

+11 -11
+11 -11
drivers/net/usb/ch9200.c
··· 111 111 request_type = (USB_DIR_IN | USB_TYPE_VENDOR | 112 112 USB_RECIP_DEVICE); 113 113 114 - netdev_dbg(dev->net, "Control_read() index=0x%02x size=%d\n", 115 - index, size); 114 + netdev_dbg(dev->net, "%s() index=0x%02x size=%d\n", 115 + __func__, index, size); 116 116 117 117 buf = kmalloc(size, GFP_KERNEL); 118 118 if (!buf) { ··· 151 151 request_type = (USB_DIR_OUT | USB_TYPE_VENDOR | 152 152 USB_RECIP_DEVICE); 153 153 154 - netdev_dbg(dev->net, "Control_write() index=0x%02x size=%d\n", 155 - index, size); 154 + netdev_dbg(dev->net, "%s() index=0x%02x size=%d\n", 155 + __func__, index, size); 156 156 157 157 if (data) { 158 158 buf = kmemdup(data, size, GFP_KERNEL); ··· 181 181 struct usbnet *dev = netdev_priv(netdev); 182 182 unsigned char buff[2]; 183 183 184 - netdev_dbg(netdev, "ch9200_mdio_read phy_id:%02x loc:%02x\n", 185 - phy_id, loc); 184 + netdev_dbg(netdev, "%s phy_id:%02x loc:%02x\n", 185 + __func__, phy_id, loc); 186 186 187 187 if (phy_id != 0) 188 188 return -ENODEV; ··· 199 199 struct usbnet *dev = netdev_priv(netdev); 200 200 unsigned char buff[2]; 201 201 202 - netdev_dbg(netdev, "ch9200_mdio_write() phy_id=%02x loc:%02x\n", 203 - phy_id, loc); 202 + netdev_dbg(netdev, "%s() phy_id=%02x loc:%02x\n", 203 + __func__, phy_id, loc); 204 204 205 205 if (phy_id != 0) 206 206 return; ··· 219 219 mii_check_media(&dev->mii, 1, 1); 220 220 mii_ethtool_gset(&dev->mii, &ecmd); 221 221 222 - netdev_dbg(dev->net, "link_reset() speed:%d duplex:%d\n", 223 - ecmd.speed, ecmd.duplex); 222 + netdev_dbg(dev->net, "%s() speed:%d duplex:%d\n", 223 + __func__, ecmd.speed, ecmd.duplex); 224 224 225 225 return 0; 226 226 } ··· 309 309 unsigned char mac_addr[0x06]; 310 310 int rd_mac_len = 0; 311 311 312 - netdev_dbg(dev->net, "get_mac_address:\n\tusbnet VID:%0x PID:%0x\n", 312 + netdev_dbg(dev->net, "%s:\n\tusbnet VID:%0x PID:%0x\n", __func__, 313 313 le16_to_cpu(dev->udev->descriptor.idVendor), 314 314 le16_to_cpu(dev->udev->descriptor.idProduct)); 315 315