11 Jul, 2016

16 commits

  • Use single spaces to separate data type from field names in structure
    definitions.

    Signed-off-by: Thierry Reding

    Thierry Reding
     
  • This macro is used to initialize the ->npwm field of the PWM chip. Use a
    literal instead and make all other places rely on ->npwm.

    Signed-off-by: Thierry Reding

    Thierry Reding
     
  • The PWM_PIN_LEVEL bit is leave unset by the kernel PWM driver.

    Prior to commit 08ee77b5a5de27ad63c92262ebcb4efe0da93b58,
    the PWM_PIN_LEVEL bit was always clear when the PWM was disable
    and a 0 logic level was apply to the output.

    According to the LPC32x0 User Manual [1],
    the default value for bit 30 (PWM_PIN_LEVEL) is 0.

    This change initialize the pin level to 0 (default value) and
    update the register value accordingly.

    [1] http://www.nxp.com/documents/user_manual/UM10326.pdf

    Signed-off-by: Sylvain Lemieux
    Signed-off-by: Thierry Reding

    Sylvain Lemieux
     
  • This adds a driver for the PWM block found in chips of the STMPE 24xx
    series of multi-purpose I2C expanders. (I think STMPE means ST
    Microelectronics Multi-Purpose Expander.) This PWM was designed in
    accordance with Nokia specifications and is kind of weird and usually
    just switched between max and zero duty cycle. However it is indeed a
    PWM so it needs to live in the PWM subsystem.

    This PWM is mostly used for white LED backlight.

    Cc: Lee Jones
    Signed-off-by: Linus Walleij
    Signed-off-by: Thierry Reding

    Linus Walleij
     
  • This adds fairly standard device tree bindings for the STMPE PWM found
    in STMPE24xx multi-purpose expanders.

    Cc: devicetree@vger.kernel.org
    Acked-by: Rob Herring
    Signed-off-by: Linus Walleij
    Signed-off-by: Thierry Reding

    Linus Walleij
     
  • Implement the ->apply() function to add support for atomic update.

    Signed-off-by: Boris Brezillon
    Tested-by: Heiko Stuebner
    Reviewed-by: Brian Norris
    Tested-by: Brian Norris
    Signed-off-by: Thierry Reding

    Boris Brezillon
     
  • The current logic will disable the PWM clk even if the PWM was left
    enabled by the bootloader (because it's controlling a critical device
    like a regulator for example).
    Keep the PWM clk enabled if the PWM is enabled to avoid any glitches.

    Signed-off-by: Boris Brezillon
    Reviewed-by: Brian Norris
    Tested-by: Brian Norris
    Tested-by: Heiko Stuebner
    Signed-off-by: Thierry Reding

    Boris Brezillon
     
  • Implement the ->get_state() function to expose initial state.

    Signed-off-by: Boris Brezillon
    Reviewed-by: Brian Norris
    Tested-by: Brian Norris
    Tested-by: Heiko Stuebner
    Signed-off-by: Thierry Reding

    Boris Brezillon
     
  • The current implementation always round down the duty and period values,
    while it would be better to round them to the closest integer.

    These changes are needed in preparation of atomic update support to
    prevent a period/duty cycle drift when executing several times the
    'pwm_get_state() / modify / pwm_apply_state()' sequence.

    Say you have an expected period of 3.333 us and a clk rate of
    112.666667 MHz -- the clock frequency doesn't divide evenly, so the
    period (stashed in nanoseconds) shrinks when we convert to the register
    value and back, as follows:

    pwm_apply_state(): register = period * 112666667 / 1000000000;
    pwm_get_state(): period = register * 1000000000 / 112666667;

    or in other words:

    period = period * 112666667 / 1000000000 * 1000000000 / 112666667;

    which yields a sequence like:

    3333 -> 3328
    3328 -> 3319
    3319 -> 3310
    3310 -> 3301
    3301 -> 3292
    3292 -> ... (etc) ...

    With this patch, we'd see instead:

    period = div_round_closest(period * 112666667, 1000000000) *
    1000000000 / 112666667;

    which yields a stable sequence:

    3333 -> 3337
    3337 -> 3337
    3337 -> ... (etc) ...

    Signed-off-by: Boris Brezillon
    Reviewed-by: Brian Norris
    Tested-by: Brian Norris
    Tested-by: Heiko Stuebner
    Signed-off-by: Thierry Reding

    Boris Brezillon
     
  • Add support for the PWM controller present in Broadcom's iProc family of
    SoCs. It has been tested on the Northstar+ bcm958625HR board.

    Signed-off-by: Yendapally Reddy Dhananjaya Reddy
    [thierry.reding@gmail.com: bunch of coding style fixes, cleanups]
    Signed-off-by: Thierry Reding

    Yendapally Reddy Dhananjaya Reddy
     
  • Add a device tree binding for Broadcom iProc PWM controller.

    Signed-off-by: Yendapally Reddy Dhananjaya Reddy
    Acked-by: Rob Herring
    Signed-off-by: Thierry Reding

    Yendapally Reddy Dhananjaya Reddy
     
  • There is no need to check each time if the clk_rate defined or not when we call
    pwm_lpss_config(). Move the check to ->probe() instead.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Thierry Reding

    Andy Shevchenko
     
  • Intel Edison has 4 PWM channels on the die with the same IP as in
    Broxton. Enable it.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Thierry Reding

    Andy Shevchenko
     
  • If duty_ns is large enough multiplying it by 255 overflows and results
    wrong duty cycle value being programmed. For example with 10ms duty when
    period is 20ms (50%) we get

    255 * 10000000 / 20000000 = -87

    because 255 * 10000000 overlows int. Whereas correct value should be

    255 * 10000000 / 20000000 = 127

    Fix this by using unsigned long long as type for on_time_div and changing
    integer literals to use proper type annotation.

    Signed-off-by: Mika Westerberg
    Signed-off-by: Thierry Reding

    Mika Westerberg
     
  • The base_unit calculation applies an offset of 0x2 which adds
    significant error for lower frequencies and doesn't appear to be
    warranted - rounding the division result gives a correct value.

    Also, the upper limit check for base_unit is off-by-one; the upper
    nibble of base_unit is invalid if >=128 according to the Table 88
    in the Z8000 Processor Series Datasheet Volume 1 (Rev. 2).

    Verified on UP Board (Cherry Trail) and Minnowboard Max (Bay Trail).

    Signed-off-by: Dan O'Donovan
    Acked-by: Mika Westerberg
    Signed-off-by: Thierry Reding

    Dan O'Donovan
     
  • The PWMSS local clock gating registers have no real purpose on OMAP ARM
    devices. These registers were left over registers from DSP IP where the
    PRCM doesn't exist. There is a silicon bug where gating and ungating clocks
    don't function properly. TRMs will be update to indicate that these
    registers shouldn't be touched.

    Therefore, all code that accesses the PWMSS_CLKCONFIG or PWMSS_CLKSTATUS
    will be removed by this patch with zero loss of functionality by the ECAP
    and EPWM drivers.

    Signed-off-by: Franklin S Cooper Jr
    Signed-off-by: Thierry Reding

    Cooper Jr., Franklin
     

08 Jul, 2016

2 commits


30 May, 2016

1 commit


29 May, 2016

21 commits

  • The self-test was updated to cover zero-length strings; the function
    needs to be updated, too.

    Reported-by: Geert Uytterhoeven
    Signed-off-by: George Spelvin
    Fixes: fcfd2fbf22d2 ("fs/namei.c: Add hashlen_string() function")
    Signed-off-by: Linus Torvalds

    George Spelvin
     
  • The original name was simply hash_string(), but that conflicted with a
    function with that name in drivers/base/power/trace.c, and I decided
    that calling it "hashlen_" was better anyway.

    But you have to do it in two places.

    [ This caused build errors for architectures that don't define
    CONFIG_DCACHE_WORD_ACCESS - Linus ]

    Signed-off-by: George Spelvin
    Reported-by: Guenter Roeck
    Fixes: fcfd2fbf22d2 ("fs/namei.c: Add hashlen_string() function")
    Signed-off-by: Linus Torvalds

    George Spelvin
     
  • The HPFS filesystem used generic_show_options to produce string that is
    displayed in /proc/mounts. However, there is a problem that the options
    may disappear after remount. If we mount the filesystem with option1
    and then remount it with option2, /proc/mounts should show both option1
    and option2, however it only shows option2 because the whole option
    string is replaced with replace_mount_options in hpfs_remount_fs.

    To fix this bug, implement the hpfs_show_options function that prints
    options that are currently selected.

    Signed-off-by: Mikulas Patocka
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Mikulas Patocka
     
  • Commit c8f33d0bec99 ("affs: kstrdup() memory handling") checks if the
    kstrdup function returns NULL due to out-of-memory condition.

    However, if we are remounting a filesystem with no change to
    filesystem-specific options, the parameter data is NULL. In this case,
    kstrdup returns NULL (because it was passed NULL parameter), although no
    out of memory condition exists. The mount syscall then fails with
    ENOMEM.

    This patch fixes the bug. We fail with ENOMEM only if data is non-NULL.

    The patch also changes the call to replace_mount_options - if we didn't
    pass any filesystem-specific options, we don't call
    replace_mount_options (thus we don't erase existing reported options).

    Fixes: c8f33d0bec99 ("affs: kstrdup() memory handling")
    Signed-off-by: Mikulas Patocka
    Cc: stable@vger.kernel.org # v4.1+
    Signed-off-by: Linus Torvalds

    Mikulas Patocka
     
  • Commit ce657611baf9 ("hpfs: kstrdup() out of memory handling") checks if
    the kstrdup function returns NULL due to out-of-memory condition.

    However, if we are remounting a filesystem with no change to
    filesystem-specific options, the parameter data is NULL. In this case,
    kstrdup returns NULL (because it was passed NULL parameter), although no
    out of memory condition exists. The mount syscall then fails with
    ENOMEM.

    This patch fixes the bug. We fail with ENOMEM only if data is non-NULL.

    The patch also changes the call to replace_mount_options - if we didn't
    pass any filesystem-specific options, we don't call
    replace_mount_options (thus we don't erase existing reported options).

    Fixes: ce657611baf9 ("hpfs: kstrdup() out of memory handling")
    Signed-off-by: Mikulas Patocka
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Mikulas Patocka
     
  • Pull more MIPS updates from Ralf Baechle:
    "This is the secondnd batch of MIPS patches for 4.7. Summary:

    CPS:
    - Copy EVA configuration when starting secondary VPs.

    EIC:
    - Clear Status IPL.

    Lasat:
    - Fix a few off by one bugs.

    lib:
    - Mark intrinsics notrace. Not only are the intrinsics
    uninteresting, it would cause infinite recursion.

    MAINTAINERS:
    - Add file patterns for MIPS BRCM device tree bindings.
    - Add file patterns for mips device tree bindings.

    MT7628:
    - Fix MT7628 pinmux typos.
    - wled_an pinmux gpio.
    - EPHY LEDs pinmux support.

    Pistachio:
    - Enable KASLR

    VDSO:
    - Build microMIPS VDSO for microMIPS kernels.
    - Fix aliasing warning by building with `-fno-strict-aliasing' for
    debugging but also tracing them might result in recursion.

    Misc:
    - Add missing FROZEN hotplug notifier transitions.
    - Fix clk binding example for varioius PIC32 devices.
    - Fix cpu interrupt controller node-names in the DT files.
    - Fix XPA CPU feature separation.
    - Fix write_gc0_* macros when writing zero.
    - Add inline asm encoding helpers.
    - Add missing VZ accessor microMIPS encodings.
    - Fix little endian microMIPS MSA encodings.
    - Add 64-bit HTW fields and fix its configuration.
    - Fix sigreturn via VDSO on microMIPS kernel.
    - Lots of typo fixes.
    - Add definitions of SegCtl registers and use them"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (49 commits)
    MIPS: Add missing FROZEN hotplug notifier transitions
    MIPS: Build microMIPS VDSO for microMIPS kernels
    MIPS: Fix sigreturn via VDSO on microMIPS kernel
    MIPS: devicetree: fix cpu interrupt controller node-names
    MIPS: VDSO: Build with `-fno-strict-aliasing'
    MIPS: Pistachio: Enable KASLR
    MIPS: lib: Mark intrinsics notrace
    MIPS: Fix 64-bit HTW configuration
    MIPS: Add 64-bit HTW fields
    MAINTAINERS: Add file patterns for mips device tree bindings
    MAINTAINERS: Add file patterns for mips brcm device tree bindings
    MIPS: Simplify DSP instruction encoding macros
    MIPS: Add missing tlbinvf/XPA microMIPS encodings
    MIPS: Fix little endian microMIPS MSA encodings
    MIPS: Add missing VZ accessor microMIPS encodings
    MIPS: Add inline asm encoding helpers
    MIPS: Spelling fix lets -> let's
    MIPS: VR41xx: Fix typo
    MIPS: oprofile: Fix typo
    MIPS: math-emu: Fix typo
    ...

    Linus Torvalds
     
  • Various builds (such as i386:allmodconfig) fail with

    fs/binfmt_aout.c:133:2: error: expected identifier or '(' before 'return'
    fs/binfmt_aout.c:134:1: error: expected identifier or '(' before '}' token

    [ Oops. My bad, I had stupidly thought that "allmodconfig" covered this
    on x86-64 too, but it obviously doesn't. Egg on my face. - Linus ]

    Fixes: 5d22fc25d4fc ("mm: remove more IS_ERR_VALUE abuses")
    Signed-off-by: Guenter Roeck
    Signed-off-by: Linus Torvalds

    Guenter Roeck
     
  • Pull string hash improvements from George Spelvin:
    "This series does several related things:

    - Makes the dcache hash (fs/namei.c) useful for general kernel use.

    (Thanks to Bruce for noticing the zero-length corner case)

    - Converts the string hashes in to use the
    above.

    - Avoids 64-bit multiplies in hash_64() on 32-bit platforms. Two
    32-bit multiplies will do well enough.

    - Rids the world of the bad hash multipliers in hash_32.

    This finishes the job started in commit 689de1d6ca95 ("Minimal
    fix-up of bad hashing behavior of hash_64()")

    The vast majority of Linux architectures have hardware support for
    32x32-bit multiply and so derive no benefit from "simplified"
    multipliers.

    The few processors that do not (68000, h8/300 and some models of
    Microblaze) have arch-specific implementations added. Those
    patches are last in the series.

    - Overhauls the dcache hash mixing.

    The patch in commit 0fed3ac866ea ("namei: Improve hash mixing if
    CONFIG_DCACHE_WORD_ACCESS") was an off-the-cuff suggestion.
    Replaced with a much more careful design that's simultaneously
    faster and better. (My own invention, as there was noting suitable
    in the literature I could find. Comments welcome!)

    - Modify the hash_name() loop to skip the initial HASH_MIX(). This
    would let us salt the hash if we ever wanted to.

    - Sort out partial_name_hash().

    The hash function is declared as using a long state, even though
    it's truncated to 32 bits at the end and the extra internal state
    contributes nothing to the result. And some callers do odd things:

    - fs/hfs/string.c only allocates 32 bits of state
    - fs/hfsplus/unicode.c uses it to hash 16-bit unicode symbols not bytes

    - Modify bytemask_from_count to handle inputs of 1..sizeof(long)
    rather than 0..sizeof(long)-1. This would simplify users other
    than full_name_hash"

    Special thanks to Bruce Fields for testing and finding bugs in v1. (I
    learned some humbling lessons about "obviously correct" code.)

    On the arch-specific front, the m68k assembly has been tested in a
    standalone test harness, I've been in contact with the Microblaze
    maintainers who mostly don't care, as the hardware multiplier is never
    omitted in real-world applications, and I haven't heard anything from
    the H8/300 world"

    * 'hash' of git://ftp.sciencehorizons.net/linux:
    h8300: Add
    microblaze: Add
    m68k: Add
    : Add support for architecture-specific functions
    fs/namei.c: Improve dcache hash function
    Eliminate bad hash multipliers from hash_32() and hash_64()
    Change hash_64() return value to 32 bits
    : Define hash_str() in terms of hashlen_string()
    fs/namei.c: Add hashlen_string() function
    Pull out string hash to

    Linus Torvalds
     
  • This will improve the performance of hash_32() and hash_64(), but due
    to complete lack of multi-bit shift instructions on H8, performance will
    still be bad in surrounding code.

    Designing H8-specific hash algorithms to work around that is a separate
    project. (But if the maintainers would like to get in touch...)

    Signed-off-by: George Spelvin
    Cc: Yoshinori Sato
    Cc: uclinux-h8-devel@lists.sourceforge.jp

    George Spelvin
     
  • Microblaze is an FPGA soft core that can be configured various ways.

    If it is configured without a multiplier, the standard __hash_32()
    will require a call to __mulsi3, which is a slow software loop.

    Instead, use a shift-and-add sequence for the constant multiply.
    GCC knows how to do this, but it's not as clever as some.

    Signed-off-by: George Spelvin
    Cc: Alistair Francis
    Cc: Michal Simek

    George Spelvin
     
  • This provides a multiply by constant GOLDEN_RATIO_32 = 0x61C88647
    for the original mc68000, which lacks a 32x32-bit multiply instruction.

    Yes, the amount of optimization effort put in is excessive. :-)

    Shift-add chain found by Yevgen Voronenko's Hcub algorithm at
    http://spiral.ece.cmu.edu/mcm/gen.html

    Signed-off-by: George Spelvin
    Cc: Geert Uytterhoeven
    Cc: Greg Ungerer
    Cc: Andreas Schwab
    Cc: Philippe De Muyter
    Cc: linux-m68k@lists.linux-m68k.org

    George Spelvin
     
  • This is just the infrastructure; there are no users yet.

    This is modelled on CONFIG_ARCH_RANDOM; a CONFIG_ symbol declares
    the existence of .

    That file may define its own versions of various functions, and define
    HAVE_* symbols (no CONFIG_ prefix!) to suppress the generic ones.

    Included is a self-test (in lib/test_hash.c) that verifies the basics.
    It is NOT in general required that the arch-specific functions compute
    the same thing as the generic, but if a HAVE_* symbol is defined with
    the value 1, then equality is tested.

    Signed-off-by: George Spelvin
    Cc: Geert Uytterhoeven
    Cc: Greg Ungerer
    Cc: Andreas Schwab
    Cc: Philippe De Muyter
    Cc: linux-m68k@lists.linux-m68k.org
    Cc: Alistair Francis
    Cc: Michal Simek
    Cc: Yoshinori Sato
    Cc: uclinux-h8-devel@lists.sourceforge.jp

    George Spelvin
     
  • Patch 0fed3ac866 improved the hash mixing, but the function is slower
    than necessary; there's a 7-instruction dependency chain (10 on x86)
    each loop iteration.

    Word-at-a-time access is a very tight loop (which is good, because
    link_path_walk() is one of the hottest code paths in the entire kernel),
    and the hash mixing function must not have a longer latency to avoid
    slowing it down.

    There do not appear to be any published fast hash functions that:
    1) Operate on the input a word at a time, and
    2) Don't need to know the length of the input beforehand, and
    3) Have a single iterated mixing function, not needing conditional
    branches or unrolling to distinguish different loop iterations.

    One of the algorithms which comes closest is Yann Collet's xxHash, but
    that's two dependent multiplies per word, which is too much.

    The key insights in this design are:

    1) Barring expensive ops like multiplies, to diffuse one input bit
    across 64 bits of hash state takes at least log2(64) = 6 sequentially
    dependent instructions. That is more cycles than we'd like.
    2) An operation like "hash ^= hash << 13" requires a second temporary
    register anyway, and on a 2-operand machine like x86, it's three
    instructions.
    3) A better use of a second register is to hold a two-word hash state.
    With careful design, no temporaries are needed at all, so it doesn't
    increase register pressure. And this gets rid of register copying
    on 2-operand machines, so the code is smaller and faster.
    4) Using two words of state weakens the requirement for one-round mixing;
    we now have two rounds of mixing before cancellation is possible.
    5) A two-word hash state also allows operations on both halves to be
    done in parallel, so on a superscalar processor we get more mixing
    in fewer cycles.

    I ended up using a mixing function inspired by the ChaCha and Speck
    round functions. It is 6 simple instructions and 3 cycles per iteration
    (assuming multiply by 9 can be done by an "lea" instruction):

    x ^= *input++;
    y ^= x; x = ROL(x, K1);
    x += y; y = ROL(y, K2);
    y *= 9;

    Not only is this reversible, two consecutive rounds are reversible:
    if you are given the initial and final states, but not the intermediate
    state, it is possible to compute both input words. This means that at
    least 3 words of input are required to create a collision.

    (It also has the property, used by hash_name() to avoid a branch, that
    it hashes all-zero to all-zero.)

    The rotate constants K1 and K2 were found by experiment. The search took
    a sample of random initial states (I used 1023) and considered the effect
    of flipping each of the 64 input bits on each of the 128 output bits two
    rounds later. Each of the 8192 pairs can be considered a biased coin, and
    adding up the Shannon entropy of all of them produces a score.

    The best-scoring shifts also did well in other tests (flipping bits in y,
    trying 3 or 4 rounds of mixing, flipping all 64*63/2 pairs of input bits),
    so the choice was made with the additional constraint that the sum of the
    shifts is odd and not too close to the word size.

    The final state is then folded into a 32-bit hash value by a less carefully
    optimized multiply-based scheme. This also has to be fast, as pathname
    components tend to be short (the most common case is one iteration!), but
    there's some room for latency, as there is a fair bit of intervening logic
    before the hash value is used for anything.

    (Performance verified with "bonnie++ -s 0 -n 1536:-2" on tmpfs. I need
    a better benchmark; the numbers seem to show a slight dip in performance
    between 4.6.0 and this patch, but they're too noisy to quote.)

    Special thanks to Bruce fields for diligent testing which uncovered a
    nasty fencepost error in an earlier version of this patch.

    [checkpatch.pl formatting complaints noted and respectfully disagreed with.]

    Signed-off-by: George Spelvin
    Tested-by: J. Bruce Fields

    George Spelvin
     
  • The "simplified" prime multipliers made very bad hash functions, so get rid
    of them. This completes the work of 689de1d6ca.

    To avoid the inefficiency which was the motivation for the "simplified"
    multipliers, hash_64() on 32-bit systems is changed to use a different
    algorithm. It makes two calls to hash_32() instead.

    drivers/media/usb/dvb-usb-v2/af9015.c uses the old GOLDEN_RATIO_PRIME_32
    for some horrible reason, so it inherits a copy of the old definition.

    Signed-off-by: George Spelvin
    Cc: Antti Palosaari
    Cc: Mauro Carvalho Chehab

    George Spelvin
     
  • That's all that's ever asked for, and it makes the return
    type of hash_long() consistent.

    It also allows (upcoming patch) an optimized implementation
    of hash_64 on 32-bit machines.

    I tried adding a BUILD_BUG_ON to ensure the number of bits requested
    was never more than 32 (most callers use a compile-time constant), but
    adding to breaks the tools/perf compiler
    unless tools/perf/MANIFEST is updated, and understanding that code base
    well enough to update it is too much trouble. I did the rest of an
    allyesconfig build with such a check, and nothing tripped.

    Signed-off-by: George Spelvin

    George Spelvin
     
  • Finally, the first use of previous two patches: eliminate the
    separate ad-hoc string hash functions in the sunrpc code.

    Now hash_str() is a wrapper around hash_string(), and hash_mem() is
    likewise a wrapper around full_name_hash().

    Note that sunrpc code *does* call hash_mem() with a zero length, which
    is why the previous patch needed to handle that in full_name_hash().
    (Thanks, Bruce, for finding that!)

    This also eliminates the only caller of hash_long which asks for
    more than 32 bits of output.

    The comment about the quality of hashlen_string() and full_name_hash()
    is jumping the gun by a few patches; they aren't very impressive now,
    but will be improved greatly later in the series.

    Signed-off-by: George Spelvin
    Tested-by: J. Bruce Fields
    Acked-by: J. Bruce Fields
    Cc: Jeff Layton
    Cc: linux-nfs@vger.kernel.org

    George Spelvin
     
  • We'd like to make more use of the highly-optimized dcache hash functions
    throughout the kernel, rather than have every subsystem create its own,
    and a function that hashes basic null-terminated strings is required
    for that.

    (The name is to emphasize that it returns both hash and length.)

    It's actually useful in the dcache itself, specifically d_alloc_name().
    Other uses in the next patch.

    full_name_hash() is also tweaked to make it more generally useful:
    1) Take a "char *" rather than "unsigned char *" argument, to
    be consistent with hash_name().
    2) Handle zero-length inputs. If we want more callers, we don't want
    to make them worry about corner cases.

    Signed-off-by: George Spelvin

    George Spelvin
     
  • ... so they can be used without the rest of

    The hashlen_* macros will make sense next patch.

    Signed-off-by: George Spelvin

    George Spelvin
     
  • Pull i2c fix from Wolfram Sang:
    "A fix for a regression introduced yesterday.

    The regression didn't show up here locally because I did not have
    PAGE_POISONING enabled. And buildbots discovered this only after it
    hit your tree. Thanks to Dan for the quick response"

    * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
    i2c: dev: use after free in detach

    Linus Torvalds
     
  • Pull chrome platform updates from Olof Johansson
    "A handful of Chrome driver and binding changes this merge window:

    - a few patches to fix probing and configuration of pstore

    - a few patches adding Elan touchpad registration on a few devices

    - EC changes: a security fix dealing with max message sizes and
    addition of compat_ioctl support.

    - keyboard backlight control support

    There was also an accidential duplicate registration of trackpads on
    'Leon', which was reverted just recently"

    * tag 'chrome-platform' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform:
    Revert "platform/chrome: chromeos_laptop: Add Leon Touch"
    platform/chrome: chromeos_laptop - Add Elan touchpad for Wolf
    platform/chrome: chromeos_laptop - Add elan trackpad option for C720
    platform/chrome: cros_ec_dev - Populate compat_ioctl
    platform/chrome: cros_ec_lightbar - use name instead of ID to hide lightbar attributes
    platform/chrome: cros_ec_dev - Fix security issue
    platform/chrome: Add Chrome OS keyboard backlight LEDs support
    platform/chrome: use to_platform_device()
    platform/chrome: pstore: Move to larger record size.
    platform/chrome: pstore: probe for ramoops buffer using acpi
    platform/chrome: chromeos_laptop: Add Leon Touch

    Linus Torvalds
     
  • Pull more sound updates from Takashi Iwai:
    "This is the second update round for 4.7-rc1. Most of changes are
    about the pending ASoC updates and fixes, including a few new drivers.
    Below are some highlights:

    ASoC:
    - New drivers for MAX98371 and TAS5720
    - SPI support for TLV320AIC32x4, along with the module split
    - TDM support for STI Uniperf IPs
    - Remaining topology API fixes / updates

    HDA:
    - A couple of Dell quirks and new Realtek codec support"

    * tag 'sound-4.7-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (63 commits)
    ALSA: hda - Fix headset mic detection problem for one Dell machine
    spi: spi-ep93xx: Fix the PTR_ERR() argument
    ALSA: hda/realtek - Add support for ALC295/ALC3254
    ASoC: kirkwood: fix build failure
    ALSA: hda - Fix headphone noise on Dell XPS 13 9360
    ASoC: ak4642: Enable cache usage to fix crashes on resume
    ASoC: twl6040: Disconnect AUX output pads on digital mute
    ASoC: tlv320aic32x4: Properly implement the positive and negative pins into the mixers
    rcar: src: skip disabled-SRC nodes
    ASoC: max98371 Remove duplicate entry in max98371_reg
    ASoC: twl6040: Select LPPLL during standby
    ASoC: rsnd: don't use prohibited number to PDMACHCRn.SRS
    ASoC: simple-card: Add pm callbacks to platform driver
    ASoC: pxa: Fix module autoload for platform drivers
    ASoC: topology: Fix memory leak in widget creation
    ASoC: Add max98371 codec driver
    ASoC: rsnd: count .probe/.remove for rsnd_mod_call()
    ASoC: topology: Check size mismatch of ABI objects before parsing
    ASoC: topology: Check failure to create a widget
    ASoC: add support for TAS5720 digital amplifier
    ...

    Linus Torvalds