30 May, 2018

1 commit

  • [ Upstream commit 55496d3fe2acd1a365c43cbd613a20ecd4d74395 ]

    The generic DMA API uses dev->dma_mask to check the DMA addressable
    memory bitmask, and warns if no mask is set or even allocated.

    Set z->dev.dma_coherent_mask on Zorro bus scan, and make z->dev.dma_mask
    to point to z->dev.dma_coherent_mask so device drivers that need DMA have
    everything set up to avoid warnings from dma_alloc_coherent(). Drivers can
    still use dma_set_mask_and_coherent() to explicitly set their DMA bit mask.

    Signed-off-by: Michael Schmitz
    [geert: Handle Zorro II with 24-bit address space]
    Acked-by: Christoph Hellwig
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Michael Schmitz
     

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
     

17 Mar, 2017

1 commit

  • Instead of creating attributes one by one, define attribute_group array
    and attach it to bus->dev_groups, so that all needed attributes are created
    automatically when a new device is registered on the bus.

    Also switch to using standard DEVICE_ATTR_RO() macros.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     

25 Dec, 2016

1 commit


25 Jan, 2016

1 commit


20 Oct, 2014

1 commit


11 Jul, 2014

1 commit

  • ARRAY_SIZE is more concise to use when the size of an array is divided
    by the size of its type or the size of its first element.

    The Coccinelle semantic patch that makes this change is as follows:

    //
    @@
    type T;
    T[] E;
    @@

    - (sizeof(E)/sizeof(T))
    + ARRAY_SIZE(E)
    //

    Signed-off-by: Himangi Saraogi
    [Geert: Also convert the MANUF definition]
    Signed-off-by: Geert Uytterhoeven

    Himangi Saraogi
     

26 Nov, 2013

5 commits


29 Jun, 2013

1 commit


02 May, 2013

1 commit

  • Supply accessor functions to set attributes in proc_dir_entry structs.

    The following are supplied: proc_set_size() and proc_set_user().

    Signed-off-by: David Howells
    Acked-by: Mauro Carvalho Chehab
    cc: linuxppc-dev@lists.ozlabs.org
    cc: linux-media@vger.kernel.org
    cc: netdev@vger.kernel.org
    cc: linux-wireless@vger.kernel.org
    cc: linux-pci@vger.kernel.org
    cc: netfilter-devel@vger.kernel.org
    cc: alsa-devel@alsa-project.org
    Signed-off-by: Al Viro

    David Howells
     

10 Apr, 2013

1 commit

  • The only part of proc_dir_entry the code outside of fs/proc
    really cares about is PDE(inode)->data. Provide a helper
    for that; static inline for now, eventually will be moved
    to fs/proc, along with the knowledge of struct proc_dir_entry
    layout.

    Signed-off-by: Al Viro

    Al Viro
     

23 Feb, 2013

1 commit


04 Jan, 2013

1 commit


16 Jul, 2012

1 commit


02 Jan, 2012

1 commit


01 Nov, 2011

1 commit


25 Oct, 2011

1 commit

  • zorro-driver.c: fix four checkpatch warnings of:
    WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

    I had a cat. The cat was mine.
    His name was Zorro. Amiga is fine.

    Signed-off-by: Jim Rotmalm
    Signed-off-by: Geert Uytterhoeven

    Jim Rotmalm
     

23 Sep, 2011

1 commit

  • As the Amiga Zorro II address space is limited to 8.5 MiB and Zorro
    devices can contain only one BAR, several Amiga Zorro II expansion
    boards (mainly graphics cards) contain multiple Zorro devices: a small
    one for the control registers and one (or more) for the graphics memory.

    The conversion of cirrusfb to the new driver framework introduced a
    regression: the driver contains a zorro_driver for the first Zorro
    device, and uses the (old) zorro_find_device() call to find the second
    Zorro device.

    However, as the Zorro core calls device_register() as soon as a Zorro
    device is identified, it may not have identified the second Zorro device
    belonging to the same physical Zorro expansion card. Hence cirrusfb
    could no longer find the second part of the Picasso II graphics card,
    causing a NULL pointer dereference.

    Defer the registration of Zorro devices with the driver framework until
    all Zorro devices have been identified to fix this.

    Note that the alternative solution (modifying cirrusfb to register a
    zorro_driver for all Zorro devices belonging to a graphics card, instead
    of only for the first one, and adding a synchronization mechanism to
    defer initialization until all have been found), is not an option, as on
    some cards one device may be optional (e.g. the second bank of 2 MiB of
    graphics memory on the Picasso IV in Zorro II mode).

    Reported-by: Ingo Jürgensmann
    Signed-off-by: Geert Uytterhoeven
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

18 Nov, 2010

1 commit


22 Oct, 2010

1 commit


10 Aug, 2010

2 commits


22 May, 2010

1 commit


18 May, 2010

2 commits


15 Feb, 2010

1 commit


06 Dec, 2009

1 commit


25 Mar, 2009

1 commit


13 Jan, 2009

3 commits


25 Jul, 2008

1 commit

  • James Bottomley warns that inclusion of linux/fs.h in a low level
    driver was always a danger signal. This patch moves
    memory_read_from_buffer() from fs.h to string.h and fixes includes in
    existing memory_read_from_buffer() users.

    Signed-off-by: Akinobu Mita
    Cc: James Bottomley
    Cc: Geert Uytterhoeven
    Cc: Zhang Rui
    Cc: Bob Moore
    Cc: Thomas Renninger
    Cc: Len Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

21 Jul, 2008

3 commits


29 Apr, 2008

1 commit

  • Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data
    be setup before gluing PDE to main tree.

    Add correct ->owner to proc_fops to fix reading/module unloading race.

    Signed-off-by: Denis V. Lunev
    Cc: Geert Uytterhoeven
    Cc: Alexey Dobriyan
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denis V. Lunev