Clean up more strings
[elmcan.git] / module / elmcan.c
index cd57cad9db3a86c24ed02b98b782a03579a40c69..d0b769439b30542483a93debe6c8cd6baf9e6be3 100644 (file)
@@ -2,13 +2,23 @@
 /* elmcan.c - ELM327 based CAN interface driver
  *            (tty line discipline)
  *
- * This file is derived from linux/drivers/net/can/slcan.c
+ * This driver started as a derivative of linux/drivers/net/can/slcan.c
+ * and my thanks go to the original authors for their inspiration.
  *
  * elmcan.c Author : Max Staudt <max-linux@enpas.org>
  * slcan.c Author  : Oliver Hartkopp <socketcan@hartkopp.net>
  * slip.c Authors  : Laurence Culhane <loz@holmes.demon.co.uk>
  *                   Fred N. van Kempen <waltje@uwalt.nl.mugnet.org>
  *
+ * This code barely bears any resemblance to slcan anymore, and whatever
+ * may be left is Linux specific boilerplate anyway, however I am leaving
+ * the GPL-2.0 identifier at the top just to be sure.
+ *
+ * Please feel free to use my own code, especially the ELM327 communication
+ * logic, in accordance with SPDX-License-Identifier BSD-3-Clause to port
+ * this driver to other systems.
+ *    - Max
+ *
  */
 
 #define pr_fmt(fmt) "[elmcan] " fmt
@@ -778,7 +788,7 @@ static struct sk_buff *elmcan_mailbox_read(struct can_rx_offload *offload,
                                           unsigned int n, u32 *timestamp,
                                           bool drop)
 {
-       WARN_ON(1); /* This function is a dummy, so don't call it! */
+       WARN_ON_ONCE(1); /* This function is a dummy, so don't call it! */
 
        return ERR_PTR(-ENOBUFS);
 }
@@ -881,7 +891,7 @@ static netdev_tx_t elmcan_netdev_start_xmit(struct sk_buff *skb,
        /* We shouldn't get here after a hardware fault:
         * can_bus_off() calls netif_carrier_off()
         */
-       WARN_ON(elm->hw_failure);
+       WARN_ON_ONCE(elm->hw_failure);
 
        if (!elm->tty ||
            elm->hw_failure ||
@@ -1272,7 +1282,7 @@ static int __init elmcan_init(void)
 {
        int status;
 
-       pr_info("ELM327 based best-effort CAN interface driver\n");
+       pr_info("ELM327 based best effort CAN interface driver\n");
        pr_info("This device is severely limited as a CAN interface, see documentation.\n");
 
        status = tty_register_ldisc(N_ELMCAN, &elmcan_ldisc);