Re: [PATCH v2] iio: bme680_i2c: Remove ACPI support

From: Joe Perches
Date: Thu May 06 2021 - 10:38:11 EST


On Thu, 2021-05-06 at 17:31 +0300, Andy Shevchenko wrote:
> On Thu, May 6, 2021 at 4:50 PM Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> > On Thu, May 06, 2021 at 03:42:08PM +0200, Hans de Goede wrote:
> > > On 5/6/21 3:37 PM, Guenter Roeck wrote:
>
> ...
>
> > > We (mostly Andy and me) are not even 100% sure this one is
> > > a fake ACPI ID, but we do pretty strongly believe that it is.
> > >
> >
> > What a mess :-(
>
> What we can do is a checkpatch-alike check for vendor ID to be
> registered in [1] and issue a warning if not. At least it alerts
> maintainers. Joe, do you think it is doable or we should have a
> separate tool for that? (Because I have no clue how checkpatch
> cohabits with internet connection, otherwise the problem with
> synchronisation of that registry might be a problem)

Perhaps best to have a separate scriptable tool and if necessary
have checkpatch use it like the spdxcheck block.

scripts/checkpatch.pl-sub is_SPDX_License_valid {
scripts/checkpatch.pl- my ($license) = @_;
scripts/checkpatch.pl-
scripts/checkpatch.pl: return 1 if (!$tree || which("python") eq "" || !(-e "$root/scripts/spdxcheck.py") || !(-e "$gitroot"));
scripts/checkpatch.pl-
scripts/checkpatch.pl- my $root_path = abs_path($root);
scripts/checkpatch.pl: my $status = `cd "$root_path"; echo "$license" | python scripts/spdxcheck.py -`;
scripts/checkpatch.pl- return 0 if ($status ne "");
scripts/checkpatch.pl- return 1;
scripts/checkpatch.pl-}

[]

scripts/checkpatch.pl- } elsif ($rawline =~ /(SPDX-License-Identifier: .*)/) {
scripts/checkpatch.pl- my $spdx_license = $1;
scripts/checkpatch.pl: if (!is_SPDX_License_valid($spdx_license)) {
scripts/checkpatch.pl- WARN("SPDX_LICENSE_TAG",
scripts/checkpatch.pl- "'$spdx_license' is not supported in LICENSES/...\n" . $herecurr);
scripts/checkpatch.pl- }