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
     

22 Aug, 2017

1 commit

  • STAudio ADCIII has the same SSID as Hoontech STDSP24, but requires a
    slightly different configuration. This patch allows user to choose
    this model via model=staudio option to set the proper configuration
    for the board.

    Bugzilla: http://bugzilla.suse.com/show_bug.cgi?id=1048934
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

07 Aug, 2017

2 commits

  • Declare snd_akm4xxx structures as const as they are only passed
    to the function snd_ice1712_akm4xxx_init. This argument is of type
    const, so make the structures const.
    Done using Coccinelle:

    @match disable optional_qualifier@
    identifier s;
    position p;
    @@
    static struct snd_akm4xxx s@p={...};

    @good1@
    identifier match.s;
    position p;
    @@
    snd_ice1712_akm4xxx_init(...,&s@p,...)

    @bad@
    identifier match.s;
    position p!={match.p,good1.p};
    @@
    s@p

    @depends on !bad disable optional_qualifier@
    identifier match.s;
    @@
    static
    +const
    struct snd_akm4xxx s={...};

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Takashi Iwai

    Bhumika Goyal
     
  • Declare snd_ak4xxx_private structures as const as they are only passed
    to the function snd_ice1712_akm4xxx_init. This argument is of type const,
    so make the structures const.
    Done using Coccinelle:

    @match disable optional_qualifier@
    identifier s;
    position p;
    @@
    static struct snd_ak4xxx_private s@p={...};

    @good1@
    identifier match.s;
    position p;
    @@
    snd_ice1712_akm4xxx_init(...,&s@p,...)

    @bad@
    identifier match.s;
    position p!={match.p,good1.p};
    @@
    s@p

    @depends on !bad disable optional_qualifier@
    identifier match.s;
    @@
    static
    +const
    struct snd_ak4xxx_private s={...};

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Takashi Iwai

    Bhumika Goyal
     

09 Jun, 2017

2 commits


21 May, 2017

1 commit

  • Declare snd_kcontrol_new structures as const as they are only passed an
    argument to the function snd_ctl_new1. This argument is of type const,
    so snd_kcontrol_new structures having this property can be made const.
    Done using Coccinelle:

    @r disable optional_qualifier@
    identifier x;
    position p;
    @@
    static struct snd_kcontrol_new x@p={...};

    @ok@
    identifier r.x;
    position p;
    @@
    snd_ctl_new1(&x@p,...)

    @bad@
    position p != {r.p,ok.p};
    identifier r.x;
    @@
    x@p

    @depends on !bad disable optional_qualifier@
    identifier r.x;
    @@
    +const
    struct snd_kcontrol_new x;

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Takashi Iwai

    Bhumika Goyal
     

20 Mar, 2017

1 commit


28 Feb, 2017

1 commit


22 Feb, 2017

1 commit

  • Declare snd_kcontrol_new structures as const as they are only passed as
    an argument to the function snd_ctl_new1. This argument is of type
    const, so snd_kcontrol_new structures having the same property can be
    made const too.
    Done using Coccinelle:

    @r1 disable optional_qualifier @
    identifier i;
    position p;
    @@
    static struct snd_kcontrol_new i@p = {...};

    @ok1@
    identifier r1.i;
    position p;
    expression e1;
    @@
    snd_ctl_new1(&i@p,e1)

    @bad@
    position p!={r1.p,ok1.p};
    identifier r1.i;
    @@
    i@p

    @depends on !bad disable optional_qualifier@
    identifier r1.i;
    @@
    +const
    struct snd_kcontrol_new i;

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Takashi Iwai

    Bhumika Goyal
     

12 Jan, 2017

1 commit


08 Sep, 2016

1 commit


02 Sep, 2016

1 commit

  • Check for snd_pcm_ops structures that are only stored in the ops field of a
    snd_soc_platform_driver structure or passed as the third argument to
    snd_pcm_set_ops. The corresponding field or parameter is declared const,
    so snd_pcm_ops structures that have this property can be declared as const
    also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct snd_pcm_ops i@p = { ... };

    @ok1@
    identifier r.i;
    struct snd_soc_platform_driver e;
    position p;
    @@
    e.ops = &i@p;

    @ok2@
    identifier r.i;
    expression e1, e2;
    position p;
    @@
    snd_pcm_set_ops(e1, e2, &i@p)

    @bad@
    position p != {r.p,ok1.p,ok2.p};
    identifier r.i;
    struct snd_pcm_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct snd_pcm_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Takashi Iwai

    Julia Lawall
     

30 Nov, 2015

1 commit


29 May, 2015

1 commit


16 Apr, 2015

1 commit

  • Replace occurences of the pci api by appropriate call to the dma api.

    A simplified version of the semantic patch that finds this problem is as
    follows: (http://coccinelle.lip6.fr)

    @deprecated@
    idexpression id;
    position p;
    @@

    (
    pci_dma_supported@p ( id, ...)
    |
    pci_alloc_consistent@p ( id, ...)
    )

    @bad1@
    idexpression id;
    position deprecated.p;
    @@
    ...when != &id->dev
    when != pci_get_drvdata ( id )
    when != pci_enable_device ( id )
    (
    pci_dma_supported@p ( id, ...)
    |
    pci_alloc_consistent@p ( id, ...)
    )

    @depends on !bad1@
    idexpression id;
    expression direction;
    position deprecated.p;
    @@

    (
    - pci_dma_supported@p ( id,
    + dma_supported ( &id->dev,
    ...
    + , GFP_ATOMIC
    )
    |
    - pci_alloc_consistent@p ( id,
    + dma_alloc_coherent ( &id->dev,
    ...
    + , GFP_ATOMIC
    )
    )

    Signed-off-by: Quentin Lambert
    Signed-off-by: Takashi Iwai

    Quentin Lambert
     

18 Mar, 2015

6 commits


29 Jan, 2015

2 commits


28 Jan, 2015

1 commit


12 Jan, 2015

1 commit


11 Jan, 2015

1 commit


09 Jan, 2015

2 commits

  • This is a similar cleanup like the commit [3db084fd0af5: ALSA: fm801:
    PCI core handles power state for us].

    Since pci_set_power_state(), pci_save_state() and pci_restore_state()
    are already done in the PCI core side, so we don't need to it doubly.

    Also, pci_enable_device(), pci_disable_device() and pci_set_master()
    calls in PM callbacks are superfluous nowadays, too, so get rid of
    them as well.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • This is a similar cleanup like the commit [3db084fd0af5: ALSA: fm801:
    PCI core handles power state for us].

    Since pci_set_power_state(), pci_save_state() and pci_restore_state()
    are already done in the PCI core side, so we don't need to it doubly.

    Also, pci_enable_device(), pci_disable_device() and pci_set_master()
    calls in PM callbacks are superfluous nowadays, too, so get rid of
    them as well.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

02 Jan, 2015

1 commit

  • The various PCM allocation functions in this driver take a pointer to a
    pointer of a PCM where if this parameter is provided the newly allocated PCM
    is stored. All callers pass NULL though, so remove the parameter. This makes
    the code a bit cleaner and shorter.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Takashi Iwai

    Lars-Peter Clausen
     

26 Dec, 2014

1 commit


17 Nov, 2014

1 commit


14 Nov, 2014

3 commits

  • earlier we were ignoring the return value of snd_ak4114_create and
    always returning 0.
    now we are returning the actual status. revo_init is calling this
    function, and revo_init is checking the return value.

    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Takashi Iwai

    Sudip Mukherjee
     
  • buf_size was initialized with snd_pcm_lib_buffer_bytes,
    but never used. and so it is safe to be deleted.

    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Takashi Iwai

    Sudip Mukherjee
     
  • the functions:
    snd_ice1712_akm4xxx_build_controls
    snd_ice1712_build_pro_mixer
    snd_ctl_add
    snd_ak4114_build
    prodigy192_ak4114_init
    snd_ak4113_build
    are all returning either 0 or a negetive error value.
    so we can easily remove the check for a negative value and return
    the value instead.

    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Takashi Iwai

    Sudip Mukherjee
     

21 Oct, 2014

2 commits


27 Aug, 2014

1 commit


13 Aug, 2014

1 commit

  • We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to
    meet kernel coding style guidelines. This issue was reported by checkpatch.

    A simplified version of the semantic patch that makes this change is as
    follows (http://coccinelle.lip6.fr/):

    //

    @@
    identifier i;
    declarer name DEFINE_PCI_DEVICE_TABLE;
    initializer z;
    @@

    - DEFINE_PCI_DEVICE_TABLE(i)
    + const struct pci_device_id i[]
    = z;

    //

    [bhelgaas: add semantic patch]
    Signed-off-by: Benoit Taine
    Signed-off-by: Bjorn Helgaas

    Benoit Taine
     

04 Jul, 2014

1 commit