24 Jan, 2014

40 commits

  • ramfs_aops is identical in file-mmu.c and file-nommu.c. Thus move it to
    fs/ramfs/inode.c and make it static.

    Signed-off-by: Axel Lin
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • Since commit 853ac43ab194 ("shmem: unify regular and tiny shmem"),
    ramfs_nommu_get_unmapped_area() and ramfs_nommu_mmap() are not directly
    referenced outside of file-nommu.c. Thus make them static.

    Signed-off-by: Axel Lin
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • These two defines are unused since the removal of the a.out interpreter
    support in the ELF loader in kernel 2.6.25

    Signed-off-by: Todor Minchev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Todor Minchev
     
  • ether_addr_copy was added for kernel version 3.14. It's slightly
    smaller/faster for some arches. Encourage its use.

    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Cc: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • This adds a simple check that any compatible strings in DeviceTree dts
    files are present in Documentation/devicetree/bindings. Vendor prefixes
    are also checked for existing in vendor-prefixes.txt These should be
    temporary checks until we have more sophisticated binding schema
    checking.

    Signed-off-by: Rob Herring
    Signed-off-by: Joe Perches
    Cc: Grant Likely
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rob Herring
     
  • This change restricts the check for the for the FSF address in the GPL
    copyright statement so that it only flags the address, not the
    references to the gnu.org/licenses URL which appears to be used in
    numerous drivers. The idea is to still allow some reference to an
    external copy of the GPL in the event that files are copied out of the
    kernel tree without the COPYING file.

    So for example this statement will still return an error:
    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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

    However, this statement will not return an error after this patch:
    You should have received a copy of the GNU General Public License
    along with this program. If not, see .

    Signed-off-by: Alexander Duyck
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Duyck
     
  • Kernel style uses function pointers in this form:
    "type (*funcptr)(args...)"

    Emit warnings when this function pointer form isn't used.

    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Cc: Derek Perrin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • The FSF address check is a bit too verbose looking for the GPL text.
    Quiet it a bit by requiring --strict for the GPL bit.

    Also make the address tests match a few uses of abbreviations for street
    names and make it case insensitive.

    Signed-off-by: Joe Perches
    Reviewed-by: Josh Triplett
    Cc: Manfred Spraul
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • If statements don't need multiple parentheses around tested comparisons
    like "if ((foo == bar))".

    An == comparison maybe a sign of an intended assignment, so emit a
    slightly different message if so.

    Signed-off-by: Joe Perches
    Reviewed-by: Josh Triplett
    Cc: Manfred Spraul
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • This test should remove all the spaces before a tab not just one space.

    Substitute a tab for each 8 space block before a tab and remove less than
    8 spaces before a tab.

    This SPACE_BEFORE_TAB test is done after CODE_INDENT.

    If there are spaces used at the beginning of a line that should be
    converted to tabs, please make sure that the CODE_INDENT test and
    conversion is done before this SPACE_BEFORE_TAB test and conversion.

    Reported-by: Manfred Spraul
    Signed-off-by: Joe Perches
    Cc: Josh Triplett
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Add the ability to fix and overwrite existing files/patches instead of
    creating a new file ".EXPERIMENTAL-checkpatch-fixes".

    Suggested-by: Manfred Spraul
    Signed-off-by: Joe Perches
    Reviewed-by: Josh Triplett
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • switch case statements missing a break statement are an unfortunately
    common error.

    e.g.:
    commit 4a2c94c9b6c0 ("HID: kye: Add report fixup for Genius Manticore Keyboard")

    case blocks should end in a break/return/goto/continue.

    If a fall-through is used, it should have a comment showing that it is
    intentional. Ideally that comment should be something like:
    "/* fall-through */"

    Add a test to look for missing break statements.

    This looks only at the context lines before an inserted case so it's
    possible to have false positives when the context contains a close brace
    and the break is before the brace and not part of the patch context.

    Looking at recent patches, this is a pretty rare occurrence. The normal
    kernel style uses a break as the last line of the previous block.

    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Cc: Jiri Kosina
    Cc: Benjamin Tissoires
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • gfp.h and page_alloc.c already specify that __GFP_NOFAIL is deprecated and
    no new users should be added.

    Add a warning to checkpatch to catch this.

    Signed-off-by: David Rientjes
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • The "space before a non-naked semicolon" test has unwanted output when
    used in "for ( ;; )" loops.

    Make the test work only on end-of-line statement termination semicolons.

    Signed-off-by: Joe Perches
    Cc: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • The current checkpatch test for split strings does not find several
    cases that should be found.

    For instance:

    /* Else poor success; go back to mode in "active" table */
    } else {
    IWL_DEBUG_RATE(mvm,
    - "LQ: GOING BACK TO THE OLD TABLE suc=%d cur-tpt=%d old-tpt=%d\n",
    + "GOING BACK TO THE OLD TABLE: SR %d "
    + "cur-tpt %d old-tpt %d\n",
    window->success_ratio,
    window->average_tpt,
    lq_sta->last_tpt);

    does not currently emit a warning.

    Improve the test to find these cases.

    Add more exceptions to reduce false positives for assembly and octal/hex
    string constants.

    Signed-off-by: Joe Perches
    Reviewed-by: Josh Triplett
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • This patch makes a couple of changes to the SMBIOS/DMI scanning
    code so it can be used on other archs (such as ARM and arm64):
    (a) wrap the calls to ioremap()/iounmap(), this allows the use of a
    flavor of ioremap() more suitable for random unaligned access;
    (b) allow the non-EFI fallback probe into hardcoded physical address
    0xF0000 to be disabled.

    Signed-off-by: Ard Biesheuvel
    Acked-by: Grant Likely
    Cc: Ingo Molnar
    Cc "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ard Biesheuvel
     
  • To help avoid an architecture failing to correctly check kernel/user
    boundaries when handling copy_to_user, copy_from_user, put_user, or
    get_user, perform some simple tests and fail to load if any of them
    behave unexpectedly.

    Specifically, this is to make sure there is a way to notice if things
    like what was fixed in commit 8404663f81d2 ("ARM: 7527/1: uaccess:
    explicitly check __user pointer when !CPU_USE_DOMAINS") ever regresses
    again, for any architecture.

    Additionally, adds new "user" selftest target, which loads this module.

    Signed-off-by: Kees Cook
    Cc: Rusty Russell
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • This is a pair of test modules I'd like to see in the tree. Instead of
    putting these in lkdtm, where I've been adding various tests that trigger
    crashes, these don't make sense there since they need to be either
    distinctly separate, or their pass/fail state don't need to crash the
    machine.

    These live in lib/ for now, along with a few other in-kernel test modules,
    and use the slightly more common "test_" naming convention, instead of
    "test-". We should likely standardize on the former:

    $ find . -name 'test_*.c' | grep -v /tools/ | wc -l
    4
    $ find . -name 'test-*.c' | grep -v /tools/ | wc -l
    2

    The first is entirely a no-op module, designed to allow simple testing of
    the module loading and verification interface. It's useful to have a
    module that has no other uses or dependencies so it can be reliably used
    for just testing module loading and verification.

    The second is a module that exercises the user memory access functions, in
    an effort to make sure that we can quickly catch any regressions in
    boundary checking (e.g. like what was recently fixed on ARM).

    This patch (of 2):

    When doing module loading verification tests (for example, with module
    signing, or LSM hooks), it is very handy to have a module that can be
    built on all systems under test, isn't auto-loaded at boot, and has no
    device or similar dependencies. This creates the "test_module.ko" module
    for that purpose, which only reports its load and unload to printk.

    Signed-off-by: Kees Cook
    Acked-by: Rusty Russell
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
    +EXPORT_SYMBOL(memparse);

    WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
    +EXPORT_SYMBOL(get_option);

    WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
    +EXPORT_SYMBOL(get_options);

    Signed-off-by: Felipe Contreras
    Cc: Levente Kurusa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Felipe Contreras
     
  • WARNING: space prohibited between function name and open parenthesis '('
    +int get_option (char **str, int *pint)

    WARNING: space prohibited between function name and open parenthesis '('
    + *pint = simple_strtol (cur, str, 0);

    ERROR: trailing whitespace
    + $

    WARNING: please, no spaces at the start of a line
    + $

    WARNING: space prohibited between function name and open parenthesis '('
    + res = get_option ((char **)&str, ints + i);

    Signed-off-by: Felipe Contreras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Felipe Contreras
     
  • We can't reach the cleanup code unless the flag KSTRTOX_OVERFLOW is not
    set, so there's not no point in clearing a bit that we know is not set.

    Signed-off-by: Felipe Contreras
    Acked-by: Levente Kurusa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Felipe Contreras
     
  • Remove unnecessary parentheses in order to fix the following checkpatch
    error.

    ERROR: return is not a function, parentheses are not required

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Remove unnecessary parentheses in order to fix the following checkpatch
    error.

    ERROR: return is not a function, parentheses are not required

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The __initdata marker can be virtually anywhere on the line, EXCEPT right
    after "struct". The preferred location is before the "=" sign if there is
    one, or before the trailing ";" otherwise. It also fixes the following
    chechpatch warning.

    WARNING: __initdata should be placed after kb3886bl_device_table[]

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_lcd_device_register() to make cleanup paths simpler.

    Signed-off-by: Jingoo Han
    Cc: Tomi Valkeinen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_lcd_device_register() to make cleanup paths simpler.

    Signed-off-by: Jingoo Han
    Cc: Tomi Valkeinen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_lcd_device_register() to make cleanup paths simpler,
    and remove unnecessary remove().

    Signed-off-by: Jingoo Han
    Cc: Tomi Valkeinen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_backlight_device_register() to make cleanup paths simpler.

    Signed-off-by: Jingoo Han
    Cc: Tomi Valkeinen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_backlight_device_register() to make cleanup paths simpler.

    Signed-off-by: Jingoo Han
    Cc: Tomi Valkeinen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_backlight_device_register() to make cleanup paths simpler,
    and remove unnecessary remove().

    Signed-off-by: Jingoo Han
    Cc: Tomi Valkeinen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_backlight_device_register() to make cleanup paths simpler.

    Signed-off-by: Jingoo Han
    Cc: Tomi Valkeinen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_backlight_device_register() to make cleanup paths simpler,
    and remove unnecessary remove().

    Signed-off-by: Jingoo Han
    Cc: Tomi Valkeinen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Remove unnecessary pattern for Exynos DP header from MAINTAINERS file.
    After commit f9b1e013f1c6 ("video: exynos_dp: remove non-DT support for
    Exynos Display Port"), 'exynos_dp.h' has not been used.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • There is a difference in how scripts/get_maintainer.pl treats
    F: and N: file pattern matches.

    Describe those differences in the MAINTAINERS file.

    Signed-off-by: Joe Perches
    Cc: Greg Kroah-Hartman
    Cc: Mark Brown
    Cc: Uwe Kleine-König
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • To make scripts/get_maintainer.pl output something sensible.

    Signed-off-by: Geert Uytterhoeven
    Cc: Alan Cox
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     
  • get_maintainer currently uses "Signed-off-by" style lines to find
    interested parties to send patches to when the MAINTAINERS file does not
    have a specific section entry with a matching file pattern.

    Add statistics for commit authors and lines added and deleted to the
    information provided by --rolestats.

    These statistics are also emitted whenever --rolestats and --git are
    selected even when there is a specified maintainer.

    This can have the effect of expanding the number of people that are shown
    as possible "maintainers" of a particular file because "authors",
    "added_lines", and "removed_lines" are also used as criterion for the
    --max-maintainers option separate from the "commit_signers".

    The first "--git-max-maintainers" values of each criterion
    are emitted. Any "ties" are not shown.

    For example: (forcedeth does not have a named maintainer)

    Old output:

    $ ./scripts/get_maintainer.pl -f drivers/net/ethernet/nvidia/forcedeth.c
    "David S. Miller" (commit_signer:8/10=80%)
    Jiri Pirko (commit_signer:2/10=20%)
    Patrick McHardy (commit_signer:2/10=20%)
    Larry Finger (commit_signer:1/10=10%)
    Peter Zijlstra (commit_signer:1/10=10%)
    netdev@vger.kernel.org (open list:NETWORKING DRIVERS)
    linux-kernel@vger.kernel.org (open list)

    New output:

    $ ./scripts/get_maintainer.pl -f drivers/net/ethernet/nvidia/forcedeth.c
    "David S. Miller" (commit_signer:8/10=80%)
    Jiri Pirko (commit_signer:2/10=20%,authored:2/10=20%,removed_lines:3/33=9%)
    Patrick McHardy (commit_signer:2/10=20%,authored:2/10=20%,added_lines:12/95=13%,removed_lines:10/33=30%)
    Larry Finger (commit_signer:1/10=10%,authored:1/10=10%,added_lines:35/95=37%)
    Peter Zijlstra (commit_signer:1/10=10%)
    "Peter Hüwe" (authored:1/10=10%,removed_lines:15/33=45%)
    Joe Perches (authored:1/10=10%)
    Neil Horman (added_lines:40/95=42%)
    Bill Pemberton (removed_lines:3/33=9%)
    netdev@vger.kernel.org (open list:NETWORKING DRIVERS)
    linux-kernel@vger.kernel.org (open list)

    Signed-off-by: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • An earlier newline was missing and current print is from different task.
    In this scenario flush the continuation line and store this line
    seperatly.

    This patch fix the below scenario of timestamp interleaving,
    [ 28.154370 ] read_word_reg : reg[0x 3], reg[0x 4] data [0x 642]
    [ 28.155428 ] uart disconnect
    [ 31.947341 ] dvfs[cpufreq.c]:plug-in cpu done
    [ 28.155445 ] UART detached : send switch state 201
    [ 32.014112 ] read_reg : reg[0x 3] data[0x21]

    [akpm@linux-foundation.org: simplify and condense the code]
    Signed-off-by: Arun KS
    Signed-off-by: Arun KS
    Cc: Joe Perches
    Cc: Tejun Heo
    Cc: Frederic Weisbecker
    Cc: Paul Gortmaker
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun KS
     
  • dma_addr_t's can be either u32 or u64 depending on a CONFIG option.

    There are a few hundred dma_addr_t's printed via either cast to unsigned
    long long, unsigned long or no cast at all.

    Add %pad to be able to emit them without the cast.

    Update Documentation/printk-formats.txt too.

    Signed-off-by: Joe Perches
    Cc: "Shevchenko, Andriy"
    Cc: Rob Landley
    Cc: Laurent Pinchart
    Cc: Julia Lawall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Add #include to define __read_mostly.

    Convert cache.h to use uapi/linux/kernel.h instead
    of linux/kernel.h to avoid recursive #includes.

    Convert the ALIGN macro to __ALIGN_KERNEL.

    printk_once only sets the bool variable tested
    once so mark it __read_mostly.

    Neaten the alignment so it matches the rest of the
    pr__once #defines too.

    Signed-off-by: Joe Perches
    Reviewed-by: James Hogan
    Cc: Wu Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Add the usage of using new feature wildcard support.

    Signed-off-by: Du, Changbin
    Cc: Jason Baron
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Du, Changbin