08 Oct, 2017

1 commit

  • commit 13f99ebdd602ebdafb909e15ec6ffb1e34690167 upstream.

    The latest gcc-7.0.1 snapshot points out that we if nr_ch is zero, we never
    initialize some variables:

    sound/pci/au88x0/au88x0_core.c: In function 'vortex_adb_allocroute':
    sound/pci/au88x0/au88x0_core.c:2304:68: error: 'mix[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    sound/pci/au88x0/au88x0_core.c:2305:58: error: 'src[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]

    I assume this can never happen in practice, but adding a check here doesn't
    hurt either and avoids the warning. The code has been unchanged since
    the start of git history.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     

16 Sep, 2016

1 commit


29 Jun, 2016

1 commit


13 May, 2016

1 commit

  • There are a few calls of memset() to stream->resources, but they all
    are called in a wrong size, sizeof(unsigned char) * VORTEX_RESOURCE_LAST,
    while this field is a u32 array. This may leave the memories not
    zero-cleared.

    Fix it by replacing them with a simpler sizeof(stream->resources)
    instead.

    Reported-by: David Binderman
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

26 Apr, 2016

1 commit

  • au88x0 hardware seems returning the current pointer at the buffer
    boundary instead of going back to zero. This results in spewing
    warnings from PCM core.

    This patch corrects the return value from the pointer callback within
    the proper value range, just returning zero if the position is equal
    or above the buffer size.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

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
     

29 Jan, 2015

1 commit


28 Jan, 2015

1 commit


29 Oct, 2014

1 commit


15 Oct, 2014

2 commits

  • pr_* macros replaced with dev_* as they are more preffered over pr_*.
    each file which had pr_* was reviewed manually and replaced with dev_*.
    here we have actually used the reference of the vortex which was added
    to some functions in the previous patch of this series.

    The prefix of the CARD_NAME and prefix of "vortex:" was also
    removed as the dev_* will print the device name.

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

    Sudip Mukherjee
     
  • added a pointer of the vortex in the following functions :

    vortex_alsafmt_aspfmt
    vortex_Vort3D_InitializeSource
    a3dsrc_ZeroStateA3D

    so that we can have a reference of the vortex in the function.
    this reference of the vortex will actually be used in a later patch
    to convert the pr_* macro to dev_*.

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

    Sudip Mukherjee
     

09 Sep, 2014

1 commit

  • as pr_* macros are more preffered over printk, so printk replaced
    with corresponding pr_* macros.
    this patch will generate warning from checkpatch as it only did printk
    replacement and didnot fixed other style issues.

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

    Sudip Mukherjee
     

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
     

12 Feb, 2014

1 commit


14 Oct, 2013

1 commit


13 Sep, 2013

1 commit


29 May, 2013

1 commit

  • As drvdata is cleared to NULL at probe failure or at removal by the
    driver core, we don't have to call pci_set_drvdata(pci, NULL) any
    longer in each driver.

    The only remaining pci_set_drvdata(NULL) is in azx_firmware_cb() in
    hda_intel.c. Since this function itself releases the card instance,
    we need to clear drvdata here as well, so that it won't be released
    doubly in the remove callback.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

14 Feb, 2013

1 commit


07 Jan, 2013

1 commit

  • vortex_wt_setdsout performs bit-negation on the bit position (wt&0x1f)
    rather than on the resulting bitmask. This code is never actually
    invoked (vortex_wt_setdsout is always called with en=1), so this does
    not currently cause any problem, and this patch is simply cleanup.

    Signed-off-by: Nickolai Zeldovich
    Signed-off-by: Takashi Iwai

    Nickolai Zeldovich
     

07 Dec, 2012

1 commit

  • CONFIG_HOTPLUG is going away as an option. As result the __dev*
    markings will be going away.

    Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
    and __devexit.

    Signed-off-by: Bill Pemberton
    Signed-off-by: Takashi Iwai

    Bill Pemberton
     

25 Oct, 2012

1 commit

  • The check of the return value from vortex_wtdma_bufshft() in
    vortex_interrupt() is useless as it executes no code. Actually the
    return value is intentionally ignored because the delta calculation
    for wavetable doesn't work always correctly. For avoiding the
    confusion, a comment is added and the superfluous if () is removed.

    Reported-by: Fengguang Wu
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

06 Oct, 2012

1 commit

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

    //
    @r1@
    statement S;
    position p,p1;
    @@
    S@p1;@p

    @script:python r2@
    p << r1.p;
    p1 << r1.p1;
    @@
    if p[0].line != p1[0].line_end:
    cocci.include_match(False)
    @@
    position r1.p;
    @@
    -;@p
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: Takashi Iwai

    Peter Senna Tschudin
     

06 Jun, 2012

1 commit


24 Apr, 2012

1 commit


16 Mar, 2012

1 commit


24 Jan, 2012

1 commit


16 Jan, 2012

2 commits


08 Jan, 2012

4 commits


19 Dec, 2011

1 commit

  • module_param(bool) used to counter-intuitively take an int. In
    fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
    trick.

    It's time to remove the int/unsigned int option. For this version
    it'll simply give a warning, but it'll break next kernel version.

    Signed-off-by: Rusty Russell
    Signed-off-by: Takashi Iwai

    Rusty Russell
     

01 Nov, 2011

2 commits


14 Sep, 2011

1 commit

  • The semantics of snd_mpu401_uart_new()'s interrupt parameters are
    somewhat counterintuitive: To prevent the function from allocating its
    own interrupt, either the irq number must be invalid, or the irq_flags
    parameter must be zero. At the same time, the irq parameter being
    invalid specifies that the mpu401 code has to work without an interrupt
    allocated by the caller. This implies that, if there is an interrupt
    and it is allocated by the caller, the irq parameter must be set to
    a valid-looking number which then isn't actually used.

    With the removal of IRQF_DISABLED, zero becomes a valid irq_flags value,
    which forces us to handle the parameters differently.

    This patch introduces a new flag MPU401_INFO_IRQ_HOOK for when the
    device interrupt is handled by the caller, and makes the allocation of
    the interrupt to depend only on the irq parameter. As suggested by
    Takashi, the irq_flags parameter was dropped because, when used, it had
    the constant value IRQF_DISABLED.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

10 Jun, 2011

2 commits

  • The name argument of request_irq() appears in /proc/interrupts, and
    it's quite ugly when the name entry contains a space or special letters.
    In general, it's simpler and more readable when the module name appears
    there, so let's replace all entries with KBUILD_MODNAME.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The convention for pci_driver.name entry in kernel drivers seem to be
    the module name or equivalent ones. But, so far, almost all PCI sound
    drivers use more verbose name like "ABC Xyz (12)", and these are fairly
    confusing when appearing as a file name.

    This patch converts the all pci_driver.name entries in sound/pci/* to
    use KBUILD_MODNAME for more unified appearance.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

22 May, 2011

1 commit


27 Apr, 2011

1 commit