hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/ethernet/qualcomm/qca_uart.c
....@@ -167,7 +167,7 @@
167167 schedule_work(&qca->tx_work);
168168 }
169169
170
-static struct serdev_device_ops qca_serdev_ops = {
170
+static const struct serdev_device_ops qca_serdev_ops = {
171171 .receive_buf = qca_tty_receive,
172172 .write_wakeup = qca_tty_wakeup,
173173 };
....@@ -248,7 +248,7 @@
248248 return NETDEV_TX_OK;
249249 }
250250
251
-static void qcauart_netdev_tx_timeout(struct net_device *dev)
251
+static void qcauart_netdev_tx_timeout(struct net_device *dev, unsigned int txqueue)
252252 {
253253 struct qcauart *qca = netdev_priv(dev);
254254
....@@ -285,8 +285,7 @@
285285 {
286286 struct qcauart *qca = netdev_priv(dev);
287287
288
- if (qca->rx_skb)
289
- dev_kfree_skb(qca->rx_skb);
288
+ dev_kfree_skb(qca->rx_skb);
290289 }
291290
292291 static const struct net_device_ops qcauart_netdev_ops = {
....@@ -351,7 +350,7 @@
351350
352351 mac = of_get_mac_address(serdev->dev.of_node);
353352
354
- if (mac)
353
+ if (!IS_ERR(mac))
355354 ether_addr_copy(qca->net_dev->dev_addr, mac);
356355
357356 if (!is_valid_ether_addr(qca->net_dev->dev_addr)) {