Re: [PATCH] USB: add SPDX identifiers to all files in drivers/usb/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 19, 2017 at 11:01:56AM +0200, Thomas Gleixner wrote:
> On Thu, 19 Oct 2017, Greg Kroah-Hartman wrote:
> > On Thu, Oct 19, 2017 at 10:50:44AM +0200, Thomas Gleixner wrote:
> > > The last discussion about this was to add the identifier as the first line
> > > of the file or as the second in case of files with a shebang in the first
> > > one.
> > > 
> > > I think you missed the last version of the script. Attached.
> > 
> > Ugh, that's ugly, creating stuff like this:
> > 
> > --- a/drivers/usb/atm/speedtch.c
> > +++ b/drivers/usb/atm/speedtch.c
> > @@ -1,3 +1,4 @@
> > +// SPDX-License-Identifier: GPL-2.0+
> >  /******************************************************************************
> >   *  speedtch.c  -  Alcatel SpeedTouch USB xDSL modem driver
> >   *
> > diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
> > 
> > 
> > Are we really ok with the '//' comments?
> 
> That's what Linus suggested so it stands out.

Oh, it stands out alright :(

But all that matters is the tag is there for tools to be able to extract
it properly.  And if we have that, it doesn't matter what the comment
"style" would be, so might as well make it look "nicer".

And, to take it to the next conclusion, if we have the SPDX identifier,
we can get rid of the "boilerplate" GPL license crap as well, right?

How about this example patch of just 2 files, we could drop so many
lines that we are all tired of reading over and over...

thanks,

greg k-h

---
 drivers/usb/core/hcd-pci.c |   15 ++-------------
 drivers/usb/core/hub.h     |   12 ++----------
 2 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index ea829ad798c0..a50caac7bffb 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -1,19 +1,8 @@
 /*
- * (C) Copyright David Brownell 2000-2002
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
+ * SPDX-License-Identifier: GPL-2.0+
  *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * for more details.
+ * (C) Copyright David Brownell 2000-2002
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
 #include <linux/kernel.h>
diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
index 34c1a7e22aae..2291ca86f5cb 100644
--- a/drivers/usb/core/hub.h
+++ b/drivers/usb/core/hub.h
@@ -1,4 +1,6 @@
 /*
+ * SPDX-License-Identifier: GPL-2.0
+ *
  * usb hub driver head file
  *
  * Copyright (C) 1999 Linus Torvalds
@@ -7,16 +9,6 @@
  * Copyright (C) 2001 Brad Hards (bhards@xxxxxxxxxxxxxx)
  * Copyright (C) 2012 Intel Corp (tianyu.lan@xxxxxxxxx)
  *
- *  move struct usb_hub to this file.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * for more details.
  */
 
 #include <linux/usb.h>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux