1. 09 8月, 2018 5 次提交
  2. 06 8月, 2018 4 次提交
  3. 03 8月, 2018 1 次提交
    • T
      ALSA: pci: Remove empty init and exit · a7da09fe
      Takashi Iwai 提交于
      For a sake of code simplification, remove the init and the exit
      entries that do nothing.
      
      Notes for readers: actually it's OK to remove *both* init and exit,
      but not OK to remove the exit entry.  By removing only the exit while
      keeping init, the module becomes permanently loaded; i.e. you cannot
      unload it any longer!
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a7da09fe
  4. 01 8月, 2018 5 次提交
  5. 29 7月, 2018 3 次提交
  6. 27 7月, 2018 17 次提交
    • J
      ALSA: ctxfi: cthw20k2: Replace mdelay() with msleep() and usleep_range() · fad56c89
      Jia-Ju Bai 提交于
      hw_pll_init(), hw_dac_stop(), hw_dac_start() and hw_adc_init()
      are never called in atomic context.
      They call mdelay() to busily wait, which is not necessary.
      mdelay() can be replaced with msleep().
      
      This is found by a static analysis tool named DCNS written by myself.
      Signed-off-by: NJia-Ju Bai <baijiaju1990@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      fad56c89
    • J
      ALSA:: ctxfi: cthw20k1: Replace mdelay() with msleep() · 08fd8325
      Jia-Ju Bai 提交于
      hw_pll_init(), hw_reset_dac() and hw_card_init() are never
      called in atomic context.
      They calls mdelay() to busily wait, which is not necessary.
      mdelay() can be replaced with msleep().
      
      This is found by a static analysis tool named DCNS written by myself.
      Signed-off-by: NJia-Ju Bai <baijiaju1990@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      08fd8325
    • T
      ALSA: atiixp_modem: Proper endian notations · 7e49aadf
      Takashi Iwai 提交于
      The DMA address table in atiixp modem driver is in little-endian,
      hence we should define it with __le32 properly.
      
      Spotted by sparse, a warning like:
        sound/pci/atiixp_modem.c:360:28: warning: incorrect type in assignment (different base types)
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7e49aadf
    • T
      ALSA: atiixp: Proper endian notations · c44a81a4
      Takashi Iwai 提交于
      The DMA address table in atiixp driver is in little-endian, hence we should define it with __le32 properly.
      
      Spotted by sparse, a warning like:
        sound/pci/atiixp.c:393:28: warning: incorrect type in assignment (different base types)
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c44a81a4
    • T
      ALSA: bt87x: Proper endian notations · 58578d18
      Takashi Iwai 提交于
      The RISC data in bt87x is in little-endian, hence we should define it
      with __le32 properly.
      
      Spotted by sparse, a warning like:
        sound/pci/bt87x.c:240:17: warning: incorrect type in assignment (different base types)
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      58578d18
    • T
      ALSA: echoaudio: Proper endian notations · 2a833a02
      Takashi Iwai 提交于
      Many data fields defined in echoaudio drivers are in little-endian,
      hence they should be defined with __le16 or __le32.  This makes it
      easier to catch the forgotten conversions.
      
      Spotted by sparse, a warning like:
        sound/pci/echoaudio/echoaudio_dsp.c:990:36: warning: incorrect type in assignment (different base types)
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2a833a02
    • T
      ALSA: maestro3: Proper endian notations · 8c0ab942
      Takashi Iwai 提交于
      The ASSP data passed to maestro3 driver is in little-endian format,
      hence the data pointer should be with __le16.
      
      Spotted by sparse, warnings like:
        sound/pci/maestro3.c:2128:35: warning: cast to restricted __le16
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      8c0ab942
    • T
      ALSA: intel8x0m: Proper endian notations · 7752a7de
      Takashi Iwai 提交于
      The BD address tables in intel8x0m driver are in little-endian, hence
      they should be represented as __le32 instead u32.
      
      Spotted by sparse, warnings like:
        sound/pci/intel8x0m.c:406:40: warning: incorrect type in assignment (different base types)
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7752a7de
    • T
      ALSA: intel8x0: Proper endian notations · 3c164e2c
      Takashi Iwai 提交于
      The BD address tables in intel8x0 driver are in little-endian, hence
      they should be represented as __le32 instead u32.
      
      Spotted by sparse, warnings like:
        sound/pci/intel8x0.c:688:40: warning: incorrect type in assignment (different base types)
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      3c164e2c
    • T
      ALSA: lola: Proper endian notations · 0d9a26fc
      Takashi Iwai 提交于
      The BDL entries in lola driver are little-endian while we code them as
      u32.  This leads to sparse warnings like:
        sound/pci/lola/lola.c:105:40: warning: incorrect type in assignment (different base types)
        sound/pci/lola/lola.c:105:40:    expected unsigned int [unsigned] [usertype] <noident>
        sound/pci/lola/lola.c:105:40:    got restricted __le32 [usertype] <noident>
      
      This patch fixes the declarations to the proper __le32 type.
      
      Also, there was a typo in the original code, where __user was used
      that was intended as __iomem.  This was caused also by sparse:
        sound/pci/lola/lola_mixer.c:132:27: warning: incorrect type in assignment (different address spaces)
      Fixed in this patch as well.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      0d9a26fc
    • T
      ALSA: mixart: Proper endian notations · 0e7ca66a
      Takashi Iwai 提交于
      The miXart driver deals with big-endian values as raw data, while it
      declares most of variables as u32.  This leads to sparse warnings like
        sound/pci/mixart/mixart.c:1203:23: warning: cast to restricted __be32
      
      Fix them by properly defining the structs and add the explicit cast to
      macros.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      0e7ca66a
    • T
      ALSA: riptide: Properly endian notations · be05e3de
      Takashi Iwai 提交于
      The SG descriptor of Riptide contains the little-endian values, hence
      we need to define with __le32 properly.  This fixes sparse warnings
      like:
        sound/pci/riptide/riptide.c:1112:40: warning: cast to restricted __le32
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      be05e3de
    • T
      ALSA: trident: Proper endian notations · 752089fe
      Takashi Iwai 提交于
      The TLB entries in Trident driver are represented in little-endian,
      hence they should be declared as __le32.
      
      This patch fixes the sparse warnings like:
        sound/pci/trident/trident_memory.c:226:17: warning: incorrect type in assignment (different base types)
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      752089fe
    • T
      ALSA: ymfpci: Proper endian notations · d3c63763
      Takashi Iwai 提交于
      The bank values are all little-endians, so they should be defined with
      __le32.  This fixes lots of sparse warnings like:
        sound/pci/ymfpci/ymfpci_main.c:315:23: warning: cast to restricted __le32
        sound/pci/ymfpci/ymfpci_main.c:342:32: warning: incorrect type in assignment (different base types)
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d3c63763
    • T
      ALSA: asihpi: Fix PCM format notations · a91a0e77
      Takashi Iwai 提交于
      asihpi driver treats -1 as an own invalid PCM format, but this needs
      a proper cast with __force prefix since PCM format type is __bitwise.
      Define a constant with the proper type and use it allover.
      
      This fixes sparse warnings like:
        sound/pci/asihpi/asihpi.c:315:9: warning: incorrect type in initializer (different base types)
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a91a0e77
    • T
      ALSA: au88x0: Fix sparse warning wrt PCM format type · 10d3d91e
      Takashi Iwai 提交于
      The PCM format type is with __bitwise, and it can't be converted from
      integer implicitly.  Instead of an ugly cast, declare the function
      argument of vortex_alsafmt_aspfmt() with the proper snd_pcm_format_t
      type.
      
      This fixes the sparse warning like:
        sound/pci/au88x0/au88x0_core.c:2778:14: warning: restricted snd_pcm_format_t degrades to integer
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      10d3d91e
    • T
      ALSA: riptide: Fix PCM format type conversion · 94dfee0c
      Takashi Iwai 提交于
      The PCM format type is with __bitwise, hence it needs to be explicitly
      declared as snd_pcm_format_t, as warned by sparse:
        sound/pci/riptide/riptide.c:1028:34: warning: incorrect type in argument 1 (different base types)
        sound/pci/riptide/riptide.c:1028:34:    expected restricted snd_pcm_format_t [usertype] format
        sound/pci/riptide/riptide.c:1028:34:    got unsigned char [unsigned] format
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      94dfee0c
  7. 26 7月, 2018 5 次提交
    • T
      ALSA: trident: Suppress gcc string warning · d6b340d7
      Takashi Iwai 提交于
      The meddlesome gcc warns about the possible shortname string in
      trident driver code:
        sound/pci/trident/trident.c: In function ‘snd_trident_probe’:
        sound/pci/trident/trident.c:126:2: warning: ‘strcat’ accessing 17 or more bytes at offsets 36 and 20 may overlap 1 byte at offset 36 [-Wrestrict]
        strcat(card->shortname, card->driver);
      
      It happens since gcc calculates the possible string size from
      card->driver, but this can't be true since we did set the string just
      before that, and they are much shorter.
      
      For shutting it up, use the exactly same string set to card->driver
      for strcat() to card->shortname, too.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d6b340d7
    • T
      ALSA: emu10k1: Fix missing __force annotation for user/kernel pointer cast · 63623646
      Takashi Iwai 提交于
      The cast between user-space and kernel-space needs an explicit __force
      prefix, but it's missing in many places in emu10k1 driver code.
      
      Spotted by sparse as a warning like:
        sound/pci/emu10k1/emufx.c:529:33: warning: cast removes address space of expression
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      63623646
    • T
      ALSA: korg1212: Add __force annotation to cast in user-copy callbacks · 0701492c
      Takashi Iwai 提交于
      The user-copy callbacks in korg1212 driver contain the explicit cast
      from a user pointer to a kernel pointer, but they missed __force
      prefix.  It's mandatory for converting between them.
      
      Spotted by sparse, a warning like:
        sound/pci/korg1212/korg1212.c:1329:33: warning: cast removes address space of expression
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      0701492c
    • T
      ALSA: hda - Fix a sparse warning about snd_ctl_elem_iface_t · ebd836ed
      Takashi Iwai 提交于
      The knew->iface field is in snd_ctl_elem_iface_t, which is with
      __bitwise, hence it can't be converted implicitly from integer.
      Give an explicit cast for the invalid type.
      
      Spotted by sparse:
        sound/pci/hda/hda_codec.c:3280:25: warning: restricted snd_ctl_elem_iface_t degrades to integer
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ebd836ed
    • T
      ALSA: hda/ca0132 - Use NULL instead of 0 · bb86124c
      Takashi Iwai 提交于
      Use NULL for initializing the snd_kcontrol_new.tlv field, instead of
      0, as warned by sparse:
        sound/pci/hda/patch_ca0132.c:5519:22: warning: Using plain integer as NULL pointer
      
      Also, the driver does the same initialization twice, once for
      knew.tlv.c and another for knew.tlv.p while both point to the same
      address (these are union).  Drop the latter superfluous one.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bb86124c