03 Sep, 2020

1 commit

  • Fix cppcheck warnings:

    sound/atmel/ac97c.c:478:30: style: Clarify calculation precedence for
    '&' and '?'. [clarifyCalculation]
    casr & AC97C_CSR_OVRUN ? " OVRUN" : "",
    ^
    sound/atmel/ac97c.c:479:30: style: Clarify calculation precedence for
    '&' and '?'. [clarifyCalculation]
    casr & AC97C_CSR_RXRDY ? " RXRDY" : "",
    ^
    sound/atmel/ac97c.c:480:30: style: Clarify calculation precedence for
    '&' and '?'. [clarifyCalculation]
    casr & AC97C_CSR_UNRUN ? " UNRUN" : "",
    ^
    sound/atmel/ac97c.c:481:30: style: Clarify calculation precedence for
    '&' and '?'. [clarifyCalculation]
    casr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "",
    ^
    sound/atmel/ac97c.c:482:30: style: Clarify calculation precedence for
    '&' and '?'. [clarifyCalculation]
    casr & AC97C_CSR_TXRDY ? " TXRDY" : "",
    ^
    sound/atmel/ac97c.c:524:30: style: Clarify calculation precedence for
    '&' and '?'. [clarifyCalculation]
    cosr & AC97C_CSR_OVRUN ? " OVRUN" : "",
    ^
    sound/atmel/ac97c.c:525:30: style: Clarify calculation precedence for
    '&' and '?'. [clarifyCalculation]
    cosr & AC97C_CSR_RXRDY ? " RXRDY" : "",
    ^
    sound/atmel/ac97c.c:526:30: style: Clarify calculation precedence for
    '&' and '?'. [clarifyCalculation]
    cosr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "",
    ^
    sound/atmel/ac97c.c:527:30: style: Clarify calculation precedence for
    '&' and '?'. [clarifyCalculation]
    cosr & AC97C_CSR_TXRDY ? " TXRDY" : "",
    ^

    Signed-off-by: Pierre-Louis Bossart
    Link: https://lore.kernel.org/r/20200902212133.30964-15-pierre-louis.bossart@linux.intel.com
    Signed-off-by: Takashi Iwai

    Pierre-Louis Bossart
     

10 Jul, 2020

1 commit


09 Jul, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva
    Link: https://lore.kernel.org/r/20200708203236.GA5112@embeddedor
    Signed-off-by: Takashi Iwai

    Gustavo A. R. Silva
     

03 Jan, 2020

1 commit

  • Now snd_ac97_bus() takes the const ops pointer, so we can define the
    snd_ac97_bus_ops locally as const as well for further optimization.

    There should be no functional changes by this patch.

    Link: https://lore.kernel.org/r/20200103081714.9560-26-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

11 Dec, 2019

2 commits


19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 May, 2019

1 commit


06 Feb, 2019

1 commit


04 Sep, 2017

2 commits


31 Aug, 2017

1 commit


23 Aug, 2017

1 commit


19 Aug, 2017

1 commit


17 Aug, 2017

1 commit


26 Jul, 2017

1 commit


01 Jul, 2017

1 commit

  • platform_get_irq() returns an error code, but the ac97c
    driver ignores it and always returns -ENXIO. This is not correct,
    and prevents -EPROBE_DEFER from being propagated properly.
    Notice that platform_get_irq() no longer returns 0 on error.

    Print and propagate the return value of platform_get_irq on failure.

    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Takashi Iwai

    Gustavo A. R. Silva
     

15 May, 2017

1 commit


20 May, 2015

1 commit

  • The recently added DT support for the ac97 driver is causing
    a gcc warning:

    sound/atmel/ac97c.c: In function 'atmel_ac97c_probe_dt':
    sound/atmel/ac97c.c:919:29: warning: unused variable 'match' [-Wunused-variable]
    const struct of_device_id *match;

    The variable is clearly unused, so we can remove it.

    Signed-off-by: Arnd Bergmann
    Acked-by: Alexander Stein
    Signed-off-by: Takashi Iwai

    Arnd Bergmann
     

07 Jan, 2015

1 commit


27 Dec, 2014

1 commit

  • at91 will no longer export the mach/cpu.h and mach/hardware.h header files
    in the future, which would break building the atmel ac97c driver.

    Since the cpu_is_* check is only used to find out whether we are running
    on avr32 or arm/at91, we can hardcode that check in the ARM case.

    Signed-off-by: Arnd Bergmann
    Link: http://www.spinics.net/lists/arm-kernel/msg382068.html
    Signed-off-by: Alexandre Belloni
    Signed-off-by: Takashi Iwai

    Arnd Bergmann
     

15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

06 Dec, 2014

3 commits

  • Clocks must be prepared before enabling them. Do this in one step.
    Replace clk_enable with clk_prepare_enable and clk_disable with
    clk_disable_unprepare.

    Signed-off-by: Alexander Stein
    Signed-off-by: Takashi Iwai

    Alexander Stein
     
  • Clocks must be prepared before enabling them. Do this in one step.
    Replace clk_enable with clk_prepare_enable and clk_disable with
    clk_disable_unprepare. This fixes the following warning:
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:895 __clk_enable+0x24/0x9c()
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper Tainted: G W 3.18.0-rc7+ #245
    [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
    [] (show_stack) from [] (warn_slowpath_common+0x60/0x80)
    [] (warn_slowpath_common) from [] (warn_slowpath_null+0x18/0x20)
    [] (warn_slowpath_null) from [] (__clk_enable+0x24/0x9c)
    [] (__clk_enable) from [] (clk_enable+0x18/0x2c)
    [] (clk_enable) from [] (atmel_ac97c_probe+0x154/0x694)
    [] (atmel_ac97c_probe) from [] (platform_drv_probe+0x48/0x94)
    [] (platform_drv_probe) from [] (driver_probe_device+0x138/0x350)
    [] (driver_probe_device) from [] (__driver_attach+0x68/0x8c)
    [] (__driver_attach) from [] (bus_for_each_dev+0x70/0x84)
    [] (bus_for_each_dev) from [] (bus_add_driver+0xfc/0x1f8)
    [] (bus_add_driver) from [] (driver_register+0x9c/0xe0)
    [] (driver_register) from [] (do_one_initcall+0x110/0x1c8)
    [] (do_one_initcall) from [] (kernel_init_freeable+0xf8/0x1b8)
    [] (kernel_init_freeable) from [] (kernel_init+0x8/0xe4)
    [] (kernel_init) from [] (ret_from_fork+0x14/0x24)
    ---[ end trace cb88537fdc8fa201 ]---
    atmel_ac97c fffa0000.sound: AC'97 0 does not respond - RESET
    atmel_ac97c fffa0000.sound: AC'97 0 access is not valid [0xffffffff], removing mixer.
    ------------[ cut here ]------------

    Signed-off-by: Alexander Stein
    Signed-off-by: Takashi Iwai

    Alexander Stein
     
  • chip->pdev->id is -1 by default. This is an invalid index resulting in
    device file names like /dev/snd/pcmC0D-1p.

    Signed-off-by: Alexander Stein
    Signed-off-by: Takashi Iwai

    Alexander Stein
     

20 Oct, 2014

1 commit


15 Oct, 2014

1 commit


11 Sep, 2014

1 commit

  • There is a common storage for platform data related structures and definitions
    inside kernel source tree. The patch moves file from include/linux to
    include/linux/platform_data and renames it acoordingly. The users are also
    updated.

    Signed-off-by: Andy Shevchenko
    Acked-by: Viresh Kumar
    [For the arch/avr32/.* and .*sound/atmel.*]
    Acked-by: Hans-Christian Egtvedt
    Signed-off-by: Vinod Koul

    Andy Shevchenko
     

16 Apr, 2014

1 commit


14 Feb, 2014

1 commit


16 Dec, 2013

1 commit


11 Dec, 2013

1 commit

  • Treat both negative and zero return values from clk_round_rate()
    as errors. This is needed since subsequent patches will convert
    clk_round_rate()'s return value to be an unsigned type, rather
    than a signed type, since some clock sources can generate rates higher
    than (2^31)-1 Hz.

    Eventually, when calling clk_round_rate(), only a return value of
    zero will be considered a error; all other values will be
    considered valid rates. The comparison against values less than
    0 is kept to preserve the correct behavior in the meantime.

    Signed-off-by: Paul Walmsley
    Acked-by: Hans-Christian Egtvedt
    Cc: Nicolas Ferre
    Signed-off-by: Takashi Iwai

    Paul Walmsley
     

02 Dec, 2013

1 commit

  • The static checker found a possible array overflow in atmel/abdac.c:
    static checker warning: "sound/atmel/abdac.c:373 set_sample_rates()
    error: buffer overflow 'dac->rates' 6 rates[]
    update not overflowing the actual array size.

    Reported-by: Dan Carpenter
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

05 Nov, 2013

1 commit


03 May, 2013

1 commit


29 Apr, 2013

1 commit


07 Dec, 2012

1 commit


20 Aug, 2012

2 commits

  • In the first case, the second test of whether retval is negative is
    redundant. It is dropped and the previous and subsequent tests are
    combined.

    In the second case, add an initialization of retval on failure of ioremap.

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

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }

    //

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

    Julia Lawall
     
  • Initialize retval before returning from a failed call to ioremap.

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

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }

    //

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

    Julia Lawall
     

09 Aug, 2012

1 commit