Thread (5 messages) 5 messages, 3 authors, 2017-12-08

Re: [PATCH v3] leds: trigger: Introduce a NETDEV trigger

flat view

From: Ben Whitten <hidden>
Date: 2017-12-07 14:19:51
Also in: linux-leds, lkml

Philippe,

On 7 December 2017 at 13:01, Philippe Ombredanne [off-list ref] wrote:
Ben,

On Thu, Dec 7, 2017 at 12:46 PM, Ben Whitten [off-list ref] wrote:
quoted
From: Ben Whitten <redacted>

This commit introduces a NETDEV trigger for named device
activity. Available triggers are link, rx, and tx.

Signed-off-by: Ben Whitten <redacted>
[]
quoted
--- /dev/null
+++ b/drivers/leds/trigger/ledtrig-netdev.c
@@ -0,0 +1,503 @@
+/*
+ * LED Kernel Netdev Trigger
+ *
+ * Toggles the LED to reflect the link and traffic state of a named net device
+ *
+ * Copyright 2017 Ben Whitten <ben.whitten@gmail.com>
+ *
+ * Copyright 2007 Oliver Jowett <oliver@opencloud.com>
+ *
+ * Derived from ledtrig-timer.c which is:
+ *  Copyright 2005-2006 Openedhand Ltd.
+ *  Author: Richard Purdie <rpurdie@openedhand.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
Have you considered using the new SPDX id instead ? See Thomas doc
patches and Greg and Linus comments on the topic
Here this would likely come out this way (yes, using a C++ comment at the top):
quoted
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * LED Kernel Netdev Trigger
+ *
+ * Toggles the LED to reflect the link and traffic state of a named net device
+ *
+ * Copyright 2017 Ben Whitten <ben.whitten@gmail.com>
+ *
+ * Copyright 2007 Oliver Jowett <oliver@opencloud.com>
+ *
+ * Derived from ledtrig-timer.c which is:
+ *  Copyright 2005-2006 Openedhand Ltd.
+ *  Author: Richard Purdie <rpurdie@openedhand.com>
+ *
+ */

This is cleaner and simpler, don't you think?
Much cleaner. Thank you for the suggestion, I was unaware of this.

Kind regards,
Ben Whitten
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help