devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philippe Ombredanne <pombredanne-od1rfyK75/E@public.gmane.org>
To: Mauro Carvalho Chehab <mchehab-JsYNTwtnfakRB7SZvlqPiA@public.gmane.org>
Cc: "Takiguchi,
	Yasunari" <Yasunari.Takiguchi-7U/KSKJipcs@public.gmane.org>,
	"akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org"
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"tbird20d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<tbird20d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Yamamoto,
	Masayuki" <Masayuki.Yamamoto-7U/KSKJipcs@public.gmane.org>,
	"Nozawa,
	Hideki (STWN)" <Hideki.Nozawa-7U/KSKJipcs@public.gmane.org>,
	"Yonezawa, Kota" <Kota.Yonezawa-7U/KSKJipcs@public.gmane.org>,
	"Matsumoto,
	Toshihiko" <Toshihiko.Matsumoto-7U/KSKJipcs@public.gmane.org>,
	"Watanabe,
	Satoshi (SSS)" <Satoshi.C.Watanabe-7U/KSKJipcs@public.gmane.org>,
	"Bird, Timothy" <Tim.Bird-7U/KSKJipcs@public.gmane.org>
Subject: Re: [PATCH v4 00/12] [dt-bindings] [media] Add document file and driver for Sony CXD2880 DVB-T2/T tuner + demodulator
Date: Thu, 14 Dec 2017 15:25:13 +0100	[thread overview]
Message-ID: <CAOFm3uEYfMH8Zj8uEx-D9yYrTyDMTG_j02619esHu-j0brQKaA@mail.gmail.com> (raw)
In-Reply-To: <20171214085503.289f06f8-ch4gOOMV7nf/PtFMR13I2A@public.gmane.org>

Dear Mauro,

On Thu, Dec 14, 2017 at 11:55 AM, Mauro Carvalho Chehab
<mchehab-JsYNTwtnfakRB7SZvlqPiA@public.gmane.org> wrote:

> SPDX is a new requirement that started late on Kernel 4.14 development
> cycle (and whose initial changes were merged directly at Linus tree).
> Not all existing files have it yet, as identifying the right license
> on existing files is a complex task, but if you do a:
>
>         $ git grep SPDX $(find . -name Makefile) $(find . -name Kconfig)
>
> You'll see that lot of such files have it already.

FWIW, short of having SPDX tags, identifying the right license on
existing files is not a super complex task: if boils down to running
many diffs.

Take the ~60K files in kernel, and about 6K license and notices
reference texts. Then compute a pairwise diff of each of the 60K file
against the 6K reference texts. Repeat the pairwise diff a few more
times, say 10 times, as multiple licenses may appear in any given
kernel file. And keep the diffs that have the fewest
difference/highest similarity with the reference texts as the detected
license. Done!

The only complex thing is that if you have a fast diff that runs at
0.1 millisec end-to-end per diff, you still have 3.6B diffs to do and
this would take about 250 days on one thread. Even with a beefy 250
core CPU, that would still be a day (and quite few kilo watts) . So
the whole trick is to avoid doing a diffs if not really needed. This
is what I do in my scancode-toolkit (that I used/use to help Greg and
Thomas with kernel license scans). Net effect is that on a laptop on 8
threads it takes ~20 minutes to scan a whole kernel using this
diff-based approach and obtain a fairly accurate license detection.
-- 
Cordially
Philippe Ombredanne
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-12-14 14:25 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13  5:46 [PATCH v4 00/12] [dt-bindings] [media] Add document file and driver for Sony CXD2880 DVB-T2/T tuner + demodulator Yasunari.Takiguchi
2017-10-13  5:58 ` [PATCH v4 01/12] [dt-bindings] [media] Add document file for CXD2880 SPI I/F Yasunari.Takiguchi
2017-10-13  5:59 ` [PATCH v4 02/12] [media] cxd2880-spi: Add support for CXD2880 SPI interface Yasunari.Takiguchi
2017-10-13  8:44   ` Honza Petrouš
2017-10-13  9:10     ` Takiguchi, Yasunari
     [not found]       ` <eab5bd7b-d909-343d-7078-842e3d0d9ab9-7U/KSKJipcs@public.gmane.org>
2017-10-13 10:26         ` Honza Petrouš
2017-10-16  1:35           ` Takiguchi, Yasunari
     [not found]   ` <20171013055928.21132-1-Yasunari.Takiguchi-7U/KSKJipcs@public.gmane.org>
2017-12-13 17:54     ` Mauro Carvalho Chehab
2017-12-20  0:54       ` Takiguchi, Yasunari
2017-10-13  6:02 ` [PATCH v4 03/12] [media] cxd2880: Add common files for the driver Yasunari.Takiguchi
2017-12-13 18:02   ` Mauro Carvalho Chehab
2017-10-13  6:10 ` [PATCH v4 08/12] [media] cxd2880: Add DVB-T control functions " Yasunari.Takiguchi
2017-10-13  6:13 ` [PATCH v4 10/12] [media] cxd2880: Add DVB-T2 control functions for " Yasunari.Takiguchi
2017-10-13  6:15 ` [PATCH v4 11/12] [media] cxd2880: Add DVB-T2 monitor functions Yasunari.Takiguchi
2017-10-13  6:17 ` [PATCH v4 12/12] [media] cxd2880: Add all Makefile, Kconfig files and Update MAINTAINERS file for the driver Yasunari.Takiguchi
     [not found] ` <20171013054635.20946-1-Yasunari.Takiguchi-7U/KSKJipcs@public.gmane.org>
2017-10-13  6:05   ` [PATCH v4 04/12] [media] cxd2880: Add spi device IO routines Yasunari.Takiguchi-7U/KSKJipcs
2017-10-13  6:07   ` [PATCH v4 05/12] [media] cxd2880: Add tuner part of the driver Yasunari.Takiguchi-7U/KSKJipcs
     [not found]     ` <20171013060725.21439-1-Yasunari.Takiguchi-7U/KSKJipcs@public.gmane.org>
2017-12-13 18:40       ` Mauro Carvalho Chehab
2017-12-20  1:01         ` Takiguchi, Yasunari
2017-10-13  6:08   ` [PATCH v4 06/12] [media] cxd2880: Add integration layer for " Yasunari.Takiguchi-7U/KSKJipcs
2017-12-03 18:23     ` Sean Young
2017-12-13 19:13     ` Mauro Carvalho Chehab
     [not found]       ` <20171213171319.675b39a6-ch4gOOMV7nf/PtFMR13I2A@public.gmane.org>
2017-12-20  1:06         ` Takiguchi, Yasunari
2017-10-13  6:09   ` [PATCH v4 07/12] [media] cxd2880: Add top level of " Yasunari.Takiguchi-7U/KSKJipcs
     [not found]     ` <20171013060934.21612-1-Yasunari.Takiguchi-7U/KSKJipcs@public.gmane.org>
2017-12-03 22:59       ` Sean Young
2017-12-05 11:47         ` Takiguchi, Yasunari
2017-12-13 19:25       ` Mauro Carvalho Chehab
2017-12-20  1:18         ` Takiguchi, Yasunari
2017-10-13  6:11   ` [PATCH v4 09/12] [media] cxd2880: Add DVB-T monitor functions Yasunari.Takiguchi-7U/KSKJipcs
2017-11-16  1:07   ` [PATCH v4 00/12] [dt-bindings] [media] Add document file and driver for Sony CXD2880 DVB-T2/T tuner + demodulator Takiguchi, Yasunari
     [not found]     ` <67ca63fc-4675-8a97-e43e-6336bbc9fada-7U/KSKJipcs@public.gmane.org>
2017-11-22  4:17       ` Takiguchi, Yasunari
     [not found]         ` <3e2f788b-3e4a-eb9b-eb36-2f65ffce669a-7U/KSKJipcs@public.gmane.org>
2017-11-29  7:38           ` Mauro Carvalho Chehab
2017-11-29  8:21             ` Takiguchi, Yasunari
2017-12-13 19:36   ` Mauro Carvalho Chehab
     [not found]     ` <20171213173633.57edca85-ch4gOOMV7nf/PtFMR13I2A@public.gmane.org>
2017-12-14  9:59       ` Takiguchi, Yasunari
2017-12-14 10:55         ` Mauro Carvalho Chehab
     [not found]           ` <20171214085503.289f06f8-ch4gOOMV7nf/PtFMR13I2A@public.gmane.org>
2017-12-14 14:25             ` Philippe Ombredanne [this message]
     [not found]               ` <CAOFm3uEYfMH8Zj8uEx-D9yYrTyDMTG_j02619esHu-j0brQKaA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-14 17:32                 ` Bird, Timothy
2017-12-14 18:04                   ` Mauro Carvalho Chehab
2017-12-14 18:30                     ` Philippe Ombredanne
2018-01-15  0:49                     ` Takiguchi, Yasunari
2018-01-15  1:27                       ` Takiguchi, Yasunari
2017-12-14 18:22                   ` Philippe Ombredanne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOFm3uEYfMH8Zj8uEx-D9yYrTyDMTG_j02619esHu-j0brQKaA@mail.gmail.com \
    --to=pombredanne-od1rfyk75/e@public.gmane.org \
    --cc=Hideki.Nozawa-7U/KSKJipcs@public.gmane.org \
    --cc=Kota.Yonezawa-7U/KSKJipcs@public.gmane.org \
    --cc=Masayuki.Yamamoto-7U/KSKJipcs@public.gmane.org \
    --cc=Satoshi.C.Watanabe-7U/KSKJipcs@public.gmane.org \
    --cc=Tim.Bird-7U/KSKJipcs@public.gmane.org \
    --cc=Toshihiko.Matsumoto-7U/KSKJipcs@public.gmane.org \
    --cc=Yasunari.Takiguchi-7U/KSKJipcs@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mchehab-JsYNTwtnfakRB7SZvlqPiA@public.gmane.org \
    --cc=tbird20d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).