02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

14 May, 2017

1 commit

  • The default NetBSD package manager is pkgsrc and it installs Perl
    along other third party programs under custom and configurable prefix.
    The default prefix for binary prebuilt packages is /usr/pkg, and the
    Perl executable lands in /usr/pkg/bin/perl.

    This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's
    the most portable solution that should work for almost everybody.
    Perl's executable is detected automatically.

    This change switches -w option passed to the executable with more
    modern "use warnings;" approach. There is no functional change to the
    default behavior.

    While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?).

    Signed-off-by: Kamil Rytarowski
    Signed-off-by: Masahiro Yamada

    Kamil Rytarowski
     

24 May, 2016

1 commit

  • A recent addition to the DRM tree for 4.7 added 'extern "C"' guards
    for c++ to all the DRM headers, and that now causes warnings
    in 'make headers_check':

    usr/include/drm/amdgpu_drm.h:38: userspace cannot reference function or variable defined in the kernel
    usr/include/drm/drm.h:63: userspace cannot reference function or variable defined in the kernel
    usr/include/drm/drm.h:699: userspace cannot reference function or variable defined in the kernel
    usr/include/drm/drm_fourcc.h:30: userspace cannot reference function or variable defined in the kernel
    usr/include/drm/drm_mode.h:33: userspace cannot reference function or variable defined in the kernel
    usr/include/drm/drm_sarea.h:38: userspace cannot reference function or variable defined in the kernel
    usr/include/drm/exynos_drm.h:21: userspace cannot reference function or variable defined in the kernel
    usr/include/drm/i810_drm.h:7: userspace cannot reference function or variable defined in the kernel

    This changes the headers_check.pl script to not warn about this.
    I'm listing the merge commit as introducing the problem, because
    there are several patches in this branch that each do this for
    one file.

    Signed-off-by: Arnd Bergmann
    Fixes: 7c10ddf87472 ("Merge branch 'drm-uapi-extern-c-fixes' of https://github.com/evelikov/linux into drm-next")
    Reviewed-by: Emil Velikov
    Signed-off-by: Dave Airlie

    Arnd Bergmann
     

20 Aug, 2014

1 commit


24 Jan, 2014

1 commit

  • "make headers_check" warns about soundcard.h for (at least) five years
    now:
    [...]/usr/include/linux/soundcard.h:1054: userspace cannot reference function or variable defined in the kernel

    We're apparently stuck with providing OSSlib-3.8 compatibility, so let's
    special case this declaration just to silence it.

    Notes:

    0) Support for OSSlib post 3.8 was already removed in commit 43a990765a
    ("sound: Remove OSSlib stuff from linux/soundcard.h"). Five years have
    passed since that commit: do people still care about OSSlib-3.8? If
    not, quite a bit of code could be remove from soundcard.h (and probably
    ultrasound.h).

    2) By the way, what is actually meant by:
    It is no longer possible to actually link against OSSlib with this
    header, but we still provide these macros for programs using them.

    Doesn't that mean compatibility to OSSlib isn't even useful?

    3) Anyhow, a previous discussion soundcard.h, which led to that commit,
    starts at https://lkml.org/lkml/2009/1/20/349 .

    4) And, yes, I sneaked in a whitespace fix.

    Signed-off-by: Paul Bolle
    Cc: Takashi Iwai
    Acked-by: Arnd Bergmann
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Bolle
     

26 Mar, 2012

1 commit

  • headers_check.pl currently emits some spurious warnings, especially for
    the drm headers, about using __[us]{8,16,32,64} types without including
    linux/types.h. Recursively search for types.h inclusion, avoiding
    circular references.

    Signed-off-by: Bobby Powers
    Cc: Sam Ravnborg
    Cc: Dave Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Michal Marek

    Bobby Powers
     

15 Dec, 2010

2 commits


08 Mar, 2010

1 commit

  • According to PBP; best way practice is to use local reference for file
    handle and three argument open. Also perl prototypes are a mistake.

    Signed-off-by: Stephen Hemminger
    Acked-by: WANG Cong
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Michal Marek

    Stephen Hemminger
     

10 Jun, 2009

2 commits

  • 'extern' checking information is not clear, refine it.
    Plus, fix a comment.

    Signed-off-by: WANG Cong
    [sam: redid the extern error message]
    Acked-by: Arnd Bergmann
    Signed-off-by: Sam Ravnborg

    Amerigo Wang
     
  • Correct the regular expression in scripts/headers_check.pl to include '_'
    as a valid character in the class; otherwise, the check will report a
    "leaked" symbol of CONFIG_A_B_C as merely CONFIG_A.

    This patch will make no difference whatsoever in the current kernel tree
    as the call to the perl routine that does that check is currently
    commented out:

    &check_include();
    &check_asm_types();
    &check_sizetypes();
    &check_prototypes();
    # Dropped for now. Too much noise &check_config();

    However, I noticed that problem when I was building the yum downloadable
    kernel source rpm for fedora 11 (beta), which *does* run that check, and
    that's where the problem became obvious.

    Signed-off-by: Robert P. J. Day
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Robert P. J. Day
     

31 Jan, 2009

1 commit

  • The check for references to CONFIG_ symbols in exported headers turned
    out to be too agressive with the current state of affairs.
    After the work of Jaswinder to clean up all relevant cases we are down
    to almost pure noise.

    So lets drop the check for now - we can always add it back later
    should our headers be ready for that.

    Signed-off-by: Sam Ravnborg
    Signed-off-by: Ingo Molnar

    Sam Ravnborg
     

03 Jan, 2009

4 commits


30 Oct, 2008

1 commit

  • Fix headers_install.pl and headers_check.pl to be compatible with versions
    of Perl less than 5.6.0. It has been tested with Perl 5.005_03 and 5.8.8.
    I realize this may not be an issue for most people, but there will still
    be some that hit it, I imagine. There are three basic issues:

    1. Prior to 5.6.0 open() only used 2 arguments, and the versions of
    the scripts in 2.6.27.1 use 3.
    2. 5.6.0 also introduced the ability to use uninitialized scalar
    variables as file handles, which the current scripts make use of.
    3. Lastly, 5.6.0 also introduced the pragma 'use warnings'. We can use
    the -w switch and be backwards compatible.

    Signed-off-by: Jeremy Huntwork
    Signed-off-by: Andrew Morton
    Signed-off-by: Sam Ravnborg

    Jeremy Huntwork
     

26 Jul, 2008

1 commit

  • Move the core functionality of headers_install
    and headers_check to two small perl scripts.
    The makefile is adapted to use the perl scrip and
    changed to operate on all files in a directory.
    So if one file is changed then all files in the
    directory is processed.

    perl were chosen for the helper scripts because this
    is pure text processing which perl is good at and
    especially the headers_check.pl script are expected to
    see changes / new checks implmented.

    The speed is ~300% faster on this box.
    And the output generated to the screen is now down to
    two lines per directory (one for install, one for check)
    so it is easier to scroll back after a kernel build.

    The perl scripts has been brought to sanity by patient
    feedback from: Vegard Nossum

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg