SPDX: Convert all of our single license tags to Linux Kernel style
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.
In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.
This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/drivers/core/Makefile b/drivers/core/Makefile
index a5039c5..bce7467 100644
--- a/drivers/core/Makefile
+++ b/drivers/core/Makefile
@@ -1,8 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
#
# Copyright (c) 2013 Google, Inc
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
obj-y += device.o fdtaddr.o lists.o root.o uclass.o util.o
obj-$(CONFIG_DEVRES) += devres.o
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c
index 3c6ab42..1cf2278 100644
--- a/drivers/core/device-remove.c
+++ b/drivers/core/device-remove.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Device manager
*
@@ -5,8 +6,6 @@
*
* (C) Copyright 2012
* Pavel Herrmann <morpheus.ibis@gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 940a153..1a32956 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Device manager
*
@@ -5,8 +6,6 @@
*
* (C) Copyright 2012
* Pavel Herrmann <morpheus.ibis@gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/devres.c b/drivers/core/devres.c
index 605295b..f2a19ec 100644
--- a/drivers/core/devres.c
+++ b/drivers/core/devres.c
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
*
* Based on the original work in Linux by
* Copyright (c) 2006 SUSE Linux Products GmbH
* Copyright (c) 2006 Tejun Heo <teheo@suse.de>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/dump.c b/drivers/core/dump.c
index 6c6b944..58820cd 100644
--- a/drivers/core/dump.c
+++ b/drivers/core/dump.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2015 Google, Inc
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/fdtaddr.c b/drivers/core/fdtaddr.c
index 9a3b4c3..528cf47 100644
--- a/drivers/core/fdtaddr.c
+++ b/drivers/core/fdtaddr.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Device addresses
*
@@ -5,8 +6,6 @@
*
* (C) Copyright 2012
* Pavel Herrmann <morpheus.ibis@gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 6fa5d10..a167726 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2013 Google, Inc
*
* (C) Copyright 2012
* Marek Vasut <marex@denx.de>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c
index 9389199..9a50f55 100644
--- a/drivers/core/of_access.c
+++ b/drivers/core/of_access.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Originally from Linux v4.9
* Paul Mackerras August 1996.
@@ -16,8 +17,6 @@
*
* This file follows drivers/of/base.c with functions in the same order as the
* Linux version.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/of_addr.c b/drivers/core/of_addr.c
index 7513ea2..1bfaaee 100644
--- a/drivers/core/of_addr.c
+++ b/drivers/core/of_addr.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Taken from Linux v4.9 drivers/of/address.c
*
* Modified for U-Boot
* Copyright (c) 2017 Google, Inc
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/of_extra.c b/drivers/core/of_extra.c
index ca2e92b..c76177c 100644
--- a/drivers/core/of_extra.c
+++ b/drivers/core/of_extra.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2017 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index 5909a25..4cd1003 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2017 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/read.c b/drivers/core/read.c
index 601d132..0322cbf 100644
--- a/drivers/core/read.c
+++ b/drivers/core/read.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2017 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/read_extra.c b/drivers/core/read_extra.c
index e94648f..5138348 100644
--- a/drivers/core/read_extra.c
+++ b/drivers/core/read_extra.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2017 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c
index 8a0e00f..a5e4e74 100644
--- a/drivers/core/regmap.c
+++ b/drivers/core/regmap.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2015 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 9000ed5..72bcc7d 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2013 Google, Inc
*
* (C) Copyright 2012
* Pavel Herrmann <morpheus.ibis@gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c
index 5acfa5f..e16d8a9 100644
--- a/drivers/core/simple-bus.c
+++ b/drivers/core/simple-bus.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2014 Google, Inc
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c
index a69937e..96408de 100644
--- a/drivers/core/syscon-uclass.c
+++ b/drivers/core/syscon-uclass.c
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2015 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index 628e2e1..0085d3f 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2013 Google, Inc
*
* (C) Copyright 2012
* Pavel Herrmann <morpheus.ibis@gmail.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
diff --git a/drivers/core/util.c b/drivers/core/util.c
index 24abe14..451d476 100644
--- a/drivers/core/util.c
+++ b/drivers/core/util.c
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2013 Google, Inc
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>