mbox series

[00/23] ASoC: codecs: remove cppcheck warnings

Message ID 20210312182246.5153-1-pierre-louis.bossart@linux.intel.com
Headers show
Series ASoC: codecs: remove cppcheck warnings | expand

Message

Pierre-Louis Bossart March 12, 2021, 6:22 p.m. UTC
Lots of small fixes in various codec drivers that should have no
functional impact.

Pierre-Louis Bossart (23):
  ASoC: ab8500-codec: remove useless structure
  ASoC: ad1836: remove useless return
  ASoC: adau1977: remove useless return
  ASoC: cros_ec_codec: remove null pointer dereference warning
  ASoC: cx2070x: remove useless assignment
  ASoC: cx2070x: remove duplicate else branch
  ASoC: da7219-aad: remove useless initialization
  ASoC: hdac_hdmi: remove useless initializations
  ASoC: hdac_hdmi: align function arguments
  ASoC: hdmi-codec: remove useless initialization
  ASoC: hdmi-codec: remove unused spk_mask member
  ASoC: max98090: remove useless assignment
  ASoC: mt6358: remove useless initializations
  ASoC: mt6359: remove useless assignment
  ASoC: nau8825: remove useless assignment
  ASoC: pcm1681: remove useless assignment
  ASoC: sigmadsp: align function prototype
  ASoC: sti-sas: remove unused struct members
  ASoC: tas2562: remove useless assignment
  ASoC: tas2562: remove warning on return value
  ASoC: tas2770: remove useless initialization
  ASoC: tlv320dac33: clarify expression
  ASoC: tscs454: remove useless test on PLL disable

 sound/soc/codecs/ab8500-codec.c  |  7 -------
 sound/soc/codecs/ad1836.c        |  2 --
 sound/soc/codecs/adau1977.c      |  2 --
 sound/soc/codecs/cros_ec_codec.c |  2 +-
 sound/soc/codecs/cx2072x.c       | 11 ++++-------
 sound/soc/codecs/da7219-aad.c    |  2 +-
 sound/soc/codecs/hdac_hdmi.c     | 14 +++++++-------
 sound/soc/codecs/hdac_hdmi.h     |  2 +-
 sound/soc/codecs/hdmi-codec.c    |  3 +--
 sound/soc/codecs/max98090.c      |  2 +-
 sound/soc/codecs/mt6358.c        |  4 ++--
 sound/soc/codecs/mt6359.c        |  4 ++--
 sound/soc/codecs/nau8825.c       |  2 +-
 sound/soc/codecs/pcm1681.c       |  2 +-
 sound/soc/codecs/sigmadsp.h      |  2 +-
 sound/soc/codecs/sti-sas.c       |  3 ---
 sound/soc/codecs/tas2562.c       |  3 +--
 sound/soc/codecs/tas2770.c       |  2 +-
 sound/soc/codecs/tlv320dac33.c   |  2 +-
 sound/soc/codecs/tscs454.c       |  7 ++++++-
 20 files changed, 32 insertions(+), 46 deletions(-)

Comments

Takashi Iwai March 14, 2021, 8:32 a.m. UTC | #1
On Fri, 12 Mar 2021 19:22:29 +0100,
Pierre-Louis Bossart wrote:
> 
> cppcheck warning:
> 
> sound/soc/codecs/cx2072x.c:1436:10: style:inconclusive: Found
> duplicate branches for 'if' and 'else'. [duplicateBranch]
>   } else if (type & 0x4) {
>          ^
> sound/soc/codecs/cx2072x.c:1439:5: note: Found duplicate branches for
> 'if' and 'else'.
>   } else {
>     ^
> sound/soc/codecs/cx2072x.c:1436:10: note: Found duplicate branches for
> 'if' and 'else'.
>   } else if (type & 0x4) {
>          ^
> 
> The last two branches do the same thing and can be collapsed together.
> 
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

Reviewed-by: Takashi Iwai <tiwai@suse.de>


thanks,

Takashi
Adam Thomson March 15, 2021, 2:50 p.m. UTC | #2
On 12 March 2021 18:23, Pierre-Louis Bossart wrote:

> cppcheck warning:
> 
> sound/soc/codecs/da7219-aad.c:118:22: style: Variable 'ret' is
> assigned a value that is never used. [unreadVariable]
>  int report = 0, ret = 0;
>                      ^
> 
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Mark Brown March 18, 2021, 6:36 p.m. UTC | #3
On Fri, 12 Mar 2021 12:22:23 -0600, Pierre-Louis Bossart wrote:
> Lots of small fixes in various codec drivers that should have no
> functional impact.
> 
> Pierre-Louis Bossart (23):
>   ASoC: ab8500-codec: remove useless structure
>   ASoC: ad1836: remove useless return
>   ASoC: adau1977: remove useless return
>   ASoC: cros_ec_codec: remove null pointer dereference warning
>   ASoC: cx2070x: remove useless assignment
>   ASoC: cx2070x: remove duplicate else branch
>   ASoC: da7219-aad: remove useless initialization
>   ASoC: hdac_hdmi: remove useless initializations
>   ASoC: hdac_hdmi: align function arguments
>   ASoC: hdmi-codec: remove useless initialization
>   ASoC: hdmi-codec: remove unused spk_mask member
>   ASoC: max98090: remove useless assignment
>   ASoC: mt6358: remove useless initializations
>   ASoC: mt6359: remove useless assignment
>   ASoC: nau8825: remove useless assignment
>   ASoC: pcm1681: remove useless assignment
>   ASoC: sigmadsp: align function prototype
>   ASoC: sti-sas: remove unused struct members
>   ASoC: tas2562: remove useless assignment
>   ASoC: tas2562: remove warning on return value
>   ASoC: tas2770: remove useless initialization
>   ASoC: tlv320dac33: clarify expression
>   ASoC: tscs454: remove useless test on PLL disable
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[01/23] ASoC: ab8500-codec: remove useless structure
        commit: 73b4fe4a03db519977a22cdf34303bd0ac21c69d
[02/23] ASoC: ad1836: remove useless return
        commit: ca6b3a6ca047d23b9b2a54af9f7f4d6f41200719
[03/23] ASoC: adau1977: remove useless return
        commit: 5b349c8f355ae4bd1de462f1f1b6164d14796b0e
[04/23] ASoC: cros_ec_codec: remove null pointer dereference warning
        commit: 157c4df677569daad6f204c63cfaf226c941bf03
[05/23] ASoC: cx2070x: remove useless assignment
        commit: 4d753b6642ee7304fc56f9fc463bb69ec641a037
[06/23] ASoC: cx2070x: remove duplicate else branch
        commit: 8d41c1ab248fa6e6bfd4728a31eec6d3b9e0f924
[07/23] ASoC: da7219-aad: remove useless initialization
        commit: f8a684a4c2c9a6f922453f0e5dc6d20b1bdb082b
[08/23] ASoC: hdac_hdmi: remove useless initializations
        commit: 426b3bbcee199e1e96ec62b1c1d9cb7019a84efb
[09/23] ASoC: hdac_hdmi: align function arguments
        commit: 997994d7e6fab713d1c03843c9698919e64cc135
[10/23] ASoC: hdmi-codec: remove useless initialization
        commit: 3c011ef344cddd15be0a9b2256f7886f6b5eeec5
[11/23] ASoC: hdmi-codec: remove unused spk_mask member
        commit: 9ad869fee5c598d914fa5cf8fb26f5e106e90956
[12/23] ASoC: max98090: remove useless assignment
        commit: 226a783f3dcf7f565c173627d565135424ee0be9
[13/23] ASoC: mt6358: remove useless initializations
        commit: 2b5e8cd53ffad8c586d8a9d47087fdb058a21287
[14/23] ASoC: mt6359: remove useless assignment
        commit: d068ab4eab0de3224b32ac37234d4d33452d5b01
[15/23] ASoC: nau8825: remove useless assignment
        commit: a3966b254c481ee1890f75d809a52e5aa358c4b1
[16/23] ASoC: pcm1681: remove useless assignment
        commit: f10280d5c59b8d83ae9e9e2307075cc7ad32a6b8
[17/23] ASoC: sigmadsp: align function prototype
        commit: 17d74e68e9765d9549acf1c36caa8b7559dc99ce
[18/23] ASoC: sti-sas: remove unused struct members
        commit: 02a70d7f26e7a3d87c9a5af39ca399b52a451a1a
[19/23] ASoC: tas2562: remove useless assignment
        commit: e83c47861c266f704d2344f51031ee67a93309ab
[20/23] ASoC: tas2562: remove warning on return value
        commit: 2e40b21cd4f697a761f1c5e4f08aac1a5c6c6018
[21/23] ASoC: tas2770: remove useless initialization
        commit: ffab1215bdbea7358051f8dd87b1240e4c6d56e6
[22/23] ASoC: tlv320dac33: clarify expression
        commit: 39e69cef0aa9f6897161a11ed84362f5805c43fd
[23/23] ASoC: tscs454: remove useless test on PLL disable
        commit: a2cc1568dc50020a807c94bd14a053dd54e9c35e

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark