23 Mar, 2011

40 commits

  • Use snprintf() here as well so we won't have to deal with this again.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • This patch fixed bugzilla #12965:
    https://bugzilla.kernel.org/show_bug.cgi?id=12965

    The original code contains some inproper use of sprintf
    function where a buffer is used both as input string
    as well as output string. It should remember the written
    bytes in the previous and use that as the offset for
    later writing. Also replace sprintf with snprintf.

    Signed-off-by: Chen Liu
    Signed-off-by: Martin Schwidefsky

    Chen Liu
     
  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (66 commits)
    avr32: at32ap700x: fix typo in DMA master configuration
    dmaengine/dmatest: Pass timeout via module params
    dma: let IMX_DMA depend on IMX_HAVE_DMA_V1 instead of an explicit list of SoCs
    fsldma: make halt behave nicely on all supported controllers
    fsldma: reduce locking during descriptor cleanup
    fsldma: support async_tx dependencies and automatic unmapping
    fsldma: fix controller lockups
    fsldma: minor codingstyle and consistency fixes
    fsldma: improve link descriptor debugging
    fsldma: use channel name in printk output
    fsldma: move related helper functions near each other
    dmatest: fix automatic buffer unmap type
    drivers, pch_dma: Fix warning when CONFIG_PM=n.
    dmaengine/dw_dmac fix: use readl & writel instead of __raw_readl & __raw_writel
    avr32: at32ap700x: Specify DMA Flow Controller, Src and Dst msize
    dw_dmac: Setting Default Burst length for transfers as 16.
    dw_dmac: Allow src/dst msize & flow controller to be configured at runtime
    dw_dmac: Changing type of src_master and dest_master to u8.
    dw_dmac: Pass Channel Priority from platform_data
    dw_dmac: Pass Channel Allocation Order from platform_data
    ...

    Linus Torvalds
     
  • I'm not sure why the read-only data section is excluded from the report,
    it seems as relevant as the other data sections (b and d).

    I've stripped the symbols starting with __mod_ as they can have their
    names dynamically generated and thus comparison between binaries is not
    possible.

    Signed-off-by: Jean Delvare
    Cc: Andi Kleen
    Acked-by: Nathan Lynch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • Instead of always creating a huge (268K) deflate_workspace with the
    maximum compression parameters (windowBits=15, memLevel=8), allow the
    caller to obtain a smaller workspace by specifying smaller parameter
    values.

    For example, when capturing oops and panic reports to a medium with
    limited capacity, such as NVRAM, compression may be the only way to
    capture the whole report. In this case, a small workspace (24K works
    fine) is a win, whether you allocate the workspace when you need it (i.e.,
    during an oops or panic) or at boot time.

    I've verified that this patch works with all accepted values of windowBits
    (positive and negative), memLevel, and compression level.

    Signed-off-by: Jim Keniston
    Cc: Herbert Xu
    Cc: David Miller
    Cc: Chris Mason
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jim Keniston
     
  • d_alloc_name return NULL in case error, but we expect errno in
    devpts_pty_new.

    Addresses http://bugzilla.openvz.org/show_bug.cgi?id=1758

    Signed-off-by: Andrey Vagin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Vagin
     
  • The test program below will hang because io_getevents() uses
    add_wait_queue_exclusive(), which means the wake_up() in io_destroy() only
    wakes up one of the threads. Fix this by using wake_up_all() in the aio
    code paths where we want to make sure no one gets stuck.

    // t.c -- compile with gcc -lpthread -laio t.c

    #include
    #include
    #include
    #include

    static const int nthr = 2;

    void *getev(void *ctx)
    {
    struct io_event ev;
    io_getevents(ctx, 1, 1, &ev, NULL);
    printf("io_getevents returned\n");
    return NULL;
    }

    int main(int argc, char *argv[])
    {
    io_context_t ctx = 0;
    pthread_t thread[nthr];
    int i;

    io_setup(1024, &ctx);

    for (i = 0; i < nthr; ++i)
    pthread_create(&thread[i], NULL, getev, ctx);

    sleep(1);

    io_destroy(ctx);

    for (i = 0; i < nthr; ++i)
    pthread_join(thread[i], NULL);

    return 0;
    }

    Signed-off-by: Roland Dreier
    Reviewed-by: Jeff Moyer
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland Dreier
     
  • Remove code enabled only when CONFIG_PREEMPT_RT is turned on because it is
    not used in the vanilla kernel.

    Signed-off-by: Alexander Gordeev
    Cc: john stultz
    Cc: Rodolfo Giometti
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Gordeev
     
  • ADFS (FileCore) storage complies with the RISC OS filetype specification
    (12 bits of file type information is stored in the file load address,
    rather than using a file extension). The existing driver largely ignores
    this information and does not present it to the end user.

    It is desirable that stored filetypes be made visible to the end user to
    facilitate a precise copy of data and metadata from a hard disc (or image
    thereof) into a RISC OS emulator (such as RPCEmu) or to a network share
    which can be accessed by real Acorn systems.

    This patch implements a per-mount filetype suffix option (use -o
    ftsuffix=1) to present any filetype as a ,xyz hexadecimal suffix on each
    file. This type suffix is compatible with that used by RISC OS systems
    that access network servers using NFS client software and by RPCemu's host
    filing system.

    Signed-off-by: Stuart Swales
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stuart Swales
     
  • ADFS (FileCore) storage complies with the RISC OS timestamp specification
    (40-bit centiseconds since 01 Jan 1900 00:00:00). It is desirable that
    stored timestamp precision be maintained to facilitate a precise copy of
    data and metadata from a hard disc (or image thereof) into a RISC OS
    emulator (such as RPCEmu).

    This patch implements a full-precision conversion from ADFS to Unix
    timestamp as the existing driver, for ease of calculation with old 32-bit
    compilers, uses the common trick of shifting the 40-bits representing
    centiseconds around into 32-bits representing seconds thereby losing
    precision.

    Signed-off-by: Stuart Swales
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stuart Swales
     
  • Kernel crashes in fs/adfs module when accessing directories with a large
    number of objects on mounted Acorn ADFS E+/F+ format discs (or images) as
    the existing code writes off the end of the fixed array of struct
    buffer_head pointers.

    Additionally, each directory access that didn't crash would leak a buffer
    as nr_buffers was not adjusted correctly for E+/F+ discs (was always left
    as one less than required).

    The patch fixes this by allocating a dynamically-sized set of struct
    buffer_head pointers if necessary for the E+/F+ case (many directories
    still do in fact fit in 2048 bytes) and sets the correct nr_buffers so
    that all buffers are released.

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=26072

    Tested by tar'ing the contents of my RISC PC's E+ format 20Gb HDD which
    contains a number of large directories that previously crashed the kernel.

    Signed-off-by: Stuart Swales
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stuart Swales
     
  • page-types.c doesn't supply a way to specify the debugfs path and the
    original debugfs path is not usual on most machines. This patch supplies
    a way to auto mount debugfs if needed.

    This patch is heavily inspired by tools/perf/utils/debugfs.c

    [akpm@linux-foundation.org: make functions static]
    [akpm@linux-foundation.org: fix debugfs_mount() signature]
    Signed-off-by: Chen Gong
    Reviewed-by: KOSAKI Motohiro
    Reviewed-by: Wu Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chen Gong
     
  • I noticed the 'mcelog' program had no comment and then ended up "fixing"
    a few more things:

    * reiserfsck -V does not print "reiserfsprogs" (any more?)
    * is "udevinfo" still shipped? udevd certainly is
    * grub2 doesn't have a 'grub' binary
    * add a "# how to get the mcelog version" comment

    Signed-off-by: Christian Kujau
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christian Kujau
     
  • There is a missing case for "Chapter 3: Placing Braces and Spaces". We
    often know we should not use braces where a single statement. The first
    case is:

    if (condition)
    action();

    Another case is:

    if (condition)
    do_this();
    else
    do_that();

    However, I can not find a description of the second case.

    Signed-off-by: Harry Wei
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harry Wei
     
  • When CONFIG_SYSCTL=n, we get the following warning:

    fs/coda/sysctl.c:18: warning: `coda_tabl' defined but not used

    Fix the warning by making sure coda_table and it's callee function are in
    the same context. Also clean up the code by removing extra #ifdef.

    [akpm@linux-foundation.org: remove unneeded stub macros]
    Signed-off-by: Rakib Mullick
    Cc: Jan Harkes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rakib Mullick
     
  • Not all 64-bit systems require ISA-style DMA, so allow it to be
    configurable. x86 utilizes the generic ISA DMA allocator from
    kernel/dma.c, so require it only when CONFIG_ISA_DMA_API is enabled.

    Disabling CONFIG_ISA_DMA_API is dependent on x86_64 since those machines
    do not have ISA slots and benefit the most from disabling the option (and
    on CONFIG_EXPERT as required by H. Peter Anvin).

    When disabled, this also avoids declaring claim_dma_lock(),
    release_dma_lock(), request_dma(), and free_dma() since those interfaces
    will no longer be provided.

    Signed-off-by: David Rientjes
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Cc: Bjorn Helgaas
    Cc: Russell King
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • The generic floppy disk driver utilizies the interface provided by
    CONFIG_ISA_DMA_API, specifically claim_dma_lock(), release_dma_lock(),
    request_dma(), and free_dma(). Thus, there's a strict dependency on the
    config option and the driver should only be loaded if the kernel supports
    ISA-style DMA.

    Signed-off-by: David Rientjes
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Cc: Bjorn Helgaas
    Cc: Russell King
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • 8237A utilizes the interface provided by CONFIG_ISA_DMA_API, specifically
    claim_dma_lock() and release_dma_lock(). Thus, there's a strict
    dependency on the config option and the module should only be loaded if
    the kernel supports ISA-style DMA.

    Signed-off-by: David Rientjes
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Cc: Bjorn Helgaas
    Cc: Russell King
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • IORESOURCE_DMA cannot be assigned without utilizing the interface
    provided by CONFIG_ISA_DMA_API, specifically request_dma() and
    free_dma(). Thus, there's a strict dependency on the config option and
    limits IORESOURCE_DMA only to architectures that support ISA-style DMA.

    ia64 is not one of those architectures, so pnp_check_dma() no longer
    needs to be special-cased for that architecture.

    pnp_assign_resources() will now return -EINVAL if IORESOURCE_DMA is
    attempted on such a kernel.

    Signed-off-by: David Rientjes
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Cc: Bjorn Helgaas
    Cc: Russell King
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • This is a platform driver that supports the built-in real-time clock on
    Tegra SOCs.

    Signed-off-by: Andrew Chew
    Acked-by: Alessandro Zummo
    Acked-by: Wan ZongShun
    Acked-by: Jon Mayo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Chew
     
  • Don't allow everybogy to write to NVRAM.

    Signed-off-by: Vasiliy Kulikov
    Cc: Andy Sharp
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vasiliy Kulikov
     
  • Add alarm/wakeup support to rtc isl1208 driver

    Signed-off-by: Ryan Mallon
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryan Mallon
     
  • There is a general move to replace bus-specific PM ops with dev_pm_ops in
    order to facilitate core improvements. Do this conversion for DS1374.

    Signed-off-by: Mark Brown
    Cc: Alessandro Zummo
    Cc: john stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Brown
     
  • In do_mounts_rd() if memory cannot be allocated, return -ENOMEM.

    Signed-off-by: Davidlohr Bueso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davidlohr Bueso
     
  • With GCC-4.6 we get warnings about things being 'set but not used'.

    In load_elf_binary() this can happen with reloc_func_desc if ELF_PLAT_INIT
    is defined, but doesn't use the reloc_func_desc argument.

    Quiet the warning/error by marking reloc_func_desc as __maybe_unused.

    Signed-off-by: David Daney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Daney
     
  • Add a comment to ep_poll(), rename labels a bit clearly, fix a warning of
    unused variable from gcc and optimize the non-blocking path a little.

    Hinted-by: Andrew Morton
    Signed-off-by: Davide Libenzi

    hannes@cmpxchg.org:

    : The non-blocking ep_poll path optimization introduced skipping over the
    : return value setup.
    :
    : Initialize it properly, my userspace gets upset by epoll_wait() returning
    : random things.
    :
    : In addition, remove the reinitialization at the fetch_events label, the
    : return value is garuanteed to be zero when execution reaches there.

    [hannes@cmpxchg.org: fix initialization]
    Signed-off-by: Johannes Weiner
    Cc: Shawn Bohrer
    Acked-by: Davide Libenzi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shawn Bohrer
     
  • Move the event readiness check into a proper inline, and use it uniformly
    inside ep_poll() code. Events in the ->ovflist are no less ready than the
    ones in ->rdllist.

    Signed-off-by: Davide Libenzi
    Cc: Shawn Bohrer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davide Libenzi
     
  • Add brackets around typecasted argument in crc32() macro.

    Signed-off-by: Konstantin Khlebnikov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Konstantin Khlebnikov
     
  • Because the second and third arguments of memset have the same type, it
    turns out to be really easy to mix them up.

    This bug comes up time after time, so checkpatch should really be checking
    for it at patch submission time.

    Signed-off-by: Dave Jones
    Cc: Steven Rostedt
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • If you run checkpatch against multiple patches, and one of them has a
    whitespace issue which can be helped via a script (rpt_cleaners), you will
    see the same NOTE over and over for all subsequent patches. It makes it
    seem like those patches also have whitespace problems when in reality,
    there's only one or two bad apples.

    So reset rpt_cleaners back to 0 after we've issued the note so that it
    only shows up near the patch with the actual problems.

    Signed-off-by: Mike Frysinger
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • Use resource_size().

    Signed-off-by: Chris Ball
    Cc: Madhusudhan Chikkature
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Ball
     
  • Signed-off-by: Chris Ball
    Cc: Jarkko Lavinen
    Cc: Tony Lindgren
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Ball
     
  • Analog Devices' SigmaStudio can produce firmware blobs for devices with
    these DSPs embedded (like some audio codecs). Allow these device drivers
    to easily parse and load them.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • 1. simple_strto*() do not contain overflow checks and crufty,
    libc way to indicate failure.
    2. strict_strto*() also do not have overflow checks but the name and
    comments pretend they do.
    3. Both families have only "long long" and "long" variants,
    but users want strtou8()
    4. Both "simple" and "strict" prefixes are wrong:
    Simple doesn't exactly say what's so simple, strict should not exist
    because conversion should be strict by default.

    The solution is to use "k" prefix and add convertors for more types.
    Enter
    kstrtoull()
    kstrtoll()
    kstrtoul()
    kstrtol()
    kstrtouint()
    kstrtoint()

    kstrtou64()
    kstrtos64()
    kstrtou32()
    kstrtos32()
    kstrtou16()
    kstrtos16()
    kstrtou8()
    kstrtos8()

    Include runtime testsuite (somewhat incomplete) as well.

    strict_strto*() become deprecated, stubbed to kstrto*() and
    eventually will be removed altogether.

    Use kstrto*() in code today!

    Note: on some archs _kstrtoul() and _kstrtol() are left in tree, even if
    they'll be unused at runtime. This is temporarily solution,
    because I don't want to hardcode list of archs where these
    functions aren't needed. Current solution with sizeof() and
    __alignof__ at least always works.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Signed-off-by: Kenneth Heitke
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kenneth Heitke
     
  • commit 5b2e303f6df ("[media] rc-core: convert winbond-cir") moved the
    files, update the pattern.

    Signed-off-by: Joe Perches
    Acked-by: David Härdeman
    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • And set the status to Orphan.

    Signed-off-by: Joe Perches
    Cc: Jeroen Vreeken
    Cc: Hans Verkuil
    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • commit 937f961a653 ("x86: Move sfi to platform") moved the files, update
    the pattern.

    Signed-off-by: Joe Perches
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • commit 82e6923e186 ("ARM: lh7a40x: remove unmaintained platform support")
    removed support, remove it from MAINTAINERS.

    Signed-off-by: Joe Perches
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • commit 3b3da9d25ae ("x86: Move scx200 to platform") moved it, convert the
    pattern too.

    Signed-off-by: Joe Perches
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches