14 Jun, 2020

1 commit

  • Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
    '---help---'"), the number of '---help---' has been gradually
    decreasing, but there are still more than 2400 instances.

    This commit finishes the conversion. While I touched the lines,
    I also fixed the indentation.

    There are a variety of indentation styles found.

    a) 4 spaces + '---help---'
    b) 7 spaces + '---help---'
    c) 8 spaces + '---help---'
    d) 1 space + 1 tab + '---help---'
    e) 1 tab + '---help---' (correct indentation)
    f) 1 tab + 1 space + '---help---'
    g) 1 tab + 2 spaces + '---help---'

    In order to convert all of them to 1 tab + 'help', I ran the
    following commend:

    $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

21 May, 2019

1 commit


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
     

25 Jan, 2014

1 commit


02 Jun, 2012

2 commits

  • The config options in the Kconfig file (with _CODEPAGE_ in the name)
    didn't match the config option name in the Makefile (no _CODEPAGE_).

    And both of them were of the hard-to-read MACXYZZY variety, which made
    them hard to parse for normal humans: MACROMAN easily reads as "macro
    man", not as "Mac Roman".

    So rename the options to be consistent, and be NLS_MAC_xyzzy. Rename
    the files to be mac-xyzzy.c too, and drop the "nls" part entirely (it's
    already in the directory name).

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • These were debug things which snuck through.

    Reported-by: Yinghai Lu
    Cc: Vladimir Serbinenko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

01 Jun, 2012

1 commit

  • HFS has support for NLS. However the relevant NLS tables are missing.
    Here they are automatically transformed from the tables at unicode.org.
    Codepages requiring special handling like CJK, RTL or Brahmic ones are not
    included in this patch.

    [akpm@linux-foundation.org: add unicode.org copyright and permission notices]
    Signed-off-by: Vladimir Serbinenko
    Cc: Alan Stern
    Cc: OGAWA Hirofumi
    Cc: Clemens Ladisch
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vladimir Serbinenko
     

27 Nov, 2011

1 commit

  • As requested by NamJae Jeon, this patch (as1503) changes the name of
    the "maxlen" parameters to "maxout" in the various UTF conversion
    routines. This should make the role of that parameter more clear.

    The patch also renames the "len" parameters to "inlen", for the same
    reason.

    Signed-off-by: Alan Stern
    Reviewed-by: NamJae Jeon
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

19 Nov, 2011

1 commit

  • The utf8s_to_utf16s conversion routine needs to be improved. Unlike
    its utf16s_to_utf8s sibling, it doesn't accept arguments specifying
    the maximum length of the output buffer or the endianness of its
    16-bit output.

    This patch (as1501) adds the two missing arguments, and adjusts the
    only two places in the kernel where the function is called. A
    follow-on patch will add a third caller that does utilize the new
    capabilities.

    The two conversion routines are still annoyingly inconsistent in the
    way they handle invalid byte combinations. But that's a subject for a
    different patch.

    Signed-off-by: Alan Stern
    CC: Clemens Ladisch
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

01 Oct, 2009

1 commit


24 Sep, 2009

1 commit

  • Most call sites of unload_nls() do:
    if (nls)
    unload_nls(nls);

    Check the pointer inside unload_nls() like we do in kfree() and
    simplify the call sites.

    Signed-off-by: Thomas Gleixner
    Cc: Steve French
    Cc: OGAWA Hirofumi
    Cc: Roman Zippel
    Cc: Dave Kleikamp
    Cc: Petr Vandrovec
    Cc: Anton Altaparmakov
    Signed-off-by: Al Viro

    Thomas Gleixner
     

01 Aug, 2009

1 commit

  • With utf8 option, vfat allowed the duplicated filenames.

    Normal nls returns -EINVAL for invalid char. But utf8s_to_utf16s()
    skipped the invalid char historically.

    So, this changes the utf8s_to_utf16s() directly to return -EINVAL for
    invalid char, because vfat is only user of it.

    mkdir /mnt/fatfs
    FILENAME=`echo -ne "invalidutf8char_\\0341_endofchar"`
    echo "Using filename: $FILENAME"
    dd if=/dev/zero of=fatfs bs=512 count=128
    mkdosfs -F 32 fatfs
    mount -o loop,utf8 fatfs /mnt/fatfs
    touch "/mnt/fatfs/$FILENAME"
    umount /mnt/fatfs
    mount -o loop,utf8 fatfs /mnt/fatfs
    touch "/mnt/fatfs/$FILENAME"
    ls -l /mnt/fatfs
    umount /mnt/fatfs

    ---- And the output is:

    Using filename: invalidutf8char_\0341_endofchar
    128+0 records in
    128+0 records out
    65536 bytes (66 kB) copied, 0.000388118 s, 169 MB/s
    mkdosfs 2.11 (12 Mar 2005)
    total 0
    -rwxr-xr-x 1 root root 0 Jun 28 19:46 invalidutf8char__endofchar
    -rwxr-xr-x 1 root root 0 Jun 28 19:46 invalidutf8char__endofchar

    Tested-by: Marton Balint
    Signed-off-by: OGAWA Hirofumi

    OGAWA Hirofumi
     

16 Jun, 2009

3 commits

  • This patch (as1239) updates the kernel's treatment of Unicode. The
    character-set conversion routines are well behind the current state of
    the Unicode specification: They don't recognize the existence of code
    points beyond plane 0 or of surrogate pairs in the UTF-16 encoding.

    The old wchar_t 16-bit type is retained because it's still used in
    lots of places. This shouldn't cause any new problems; if a
    conversion now results in an invalid 16-bit code then before it must
    have yielded an undefined code.

    Difficult-to-read names like "utf_mbstowcs" are replaced with more
    transparent names like "utf8s_to_utf16s" and the ordering of the
    parameters is rationalized (buffer lengths come immediate after the
    pointers they refer to, and the inputs precede the outputs).
    Fortunately the low-level conversion routines are used in only a few
    places; the interfaces to the higher-level uni2char and char2uni
    methods have been left unchanged.

    Signed-off-by: Alan Stern
    Acked-by: Clemens Ladisch
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • utf8_wcstombs forgot to include one-byte UTF-8 characters when
    calculating the output buffer size, i.e., theoretically, it was possible
    to overflow the output buffer with an input string that contains enough
    ASCII characters.

    In practice, this was no problem because the only user so far (VFAT)
    always uses a big enough output buffer.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Greg Kroah-Hartman

    Clemens Ladisch
     
  • When utf8_wcstombs encounters a character that cannot be encoded, we
    must not decrease the remaining output buffer size because nothing has
    been written to the output buffer.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Greg Kroah-Hartman

    Clemens Ladisch
     

16 Oct, 2008

1 commit


19 Oct, 2007

1 commit

  • Get rid of sparse related warnings from places that use integer as NULL
    pointer.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Stephen Hemminger
    Cc: Andi Kleen
    Cc: Jeff Garzik
    Cc: Matt Mackall
    Cc: Ian Kent
    Cc: Arnd Bergmann
    Cc: Davide Libenzi
    Cc: Stephen Smalley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Hemminger
     

17 Oct, 2007

2 commits

  • Changes NLS and DLM menus into a 'menuconfig' object so that it can be
    disabled at once without having to enter the menu first to disable the config
    option.

    Signed-off-by: Jan Engelhardt
    Cc: Steven Whitehouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Engelhardt
     
  • Add const modifiers to a few struct nls_table's member pointers in
    include/linux/nls.h and adds a lot of const's in fs/nls/*.c files.

    Resulting changes as visible by size:

    text data bss dec hex filename
    113612 481216 2368 597196 91ccc nls.org/built-in.o
    593548 3296 288 597132 91c8c nls/built-in.o

    Apparently compiler managed to optimize code a bit better
    because of const-ness.

    No other changes are made.

    Signed-off-by: Denys Vlasenko
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denys Vlasenko
     

17 Jul, 2007

1 commit


08 Dec, 2006

1 commit

  • Twenty characters in cp936 are not correctly handled. They're all in the
    U00 plane. nls_cp936 converts all U00XY to XY but this is not correct for
    some characters.(e.g. U00B7 -> A1A4, U00A8 -> A1A7).

    This problem is fixed by generating u2c_00 based on all c2u_xx and changing
    uni2char() to give U00 plane a special handling. The "€"(U20AC,80 in
    cp936) is also be handled properly.

    Acked-by: Gang Chen
    Cc: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jun Chen
     

04 Oct, 2006

1 commit


02 Oct, 2006

1 commit


01 Jul, 2006

1 commit


24 Mar, 2006

1 commit

  • Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a
    duplicate of ARRAY_SIZE. Some trailing whitespaces are also deleted.

    Signed-off-by: Tobias Klauser
    Cc: David Howells
    Cc: Dave Kleikamp
    Acked-by: Trond Myklebust
    Cc: Neil Brown
    Cc: Chris Mason
    Cc: Jeff Mahoney
    Cc: Christoph Hellwig
    Cc: Nathan Scott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tobias Klauser
     

22 Mar, 2006

1 commit


06 May, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds