ASoC: Intel: cht_bsw_rt5672: remove useless test
Subsystems (3)
PATCH 1/1 ASoC: Intel: cht_bsw_rt5672: remove useless test
For some reason we test if the machine is passed as a parameter before fixing up the codec name. This is unnecessary, generates false positives in static analysis tools and done only in this machine driver, remove and adjust indentation.
--- sound/soc/intel/boards/cht_bsw_rt5672.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)
sound/soc/intel/boards/cht_bsw_rt5672.c +9 -12
@@ -411,18 +411,15 @@ static int snd_cht_mc_probe(struct platform_device *pdev)strcpy (drv->codec_name,RT5672_I2C_DEFAULT );/* fixup codec name based on HID */ -if (mach) { - i2c_name =acpi_dev_get_first_match_name (mach->id,NULL ,-1 ); -if (i2c_name) { -snprintf (drv->codec_name,sizeof (drv->codec_name), -"i2c-%s" , i2c_name); -for (i =0 ; i <ARRAY_SIZE (cht_dailink); i++) { -if (!strcmp (cht_dailink[i].codec_name, -RT5672_I2C_DEFAULT )) { - cht_dailink[i].codec_name = - drv->codec_name; -break ; - } + i2c_name =acpi_dev_get_first_match_name (mach->id,NULL ,-1 ); +if (i2c_name) { +snprintf (drv->codec_name,sizeof (drv->codec_name), +"i2c-%s" , i2c_name); +for (i =0 ; i <ARRAY_SIZE (cht_dailink); i++) { +if (!strcmp (cht_dailink[i].codec_name, +RT5672_I2C_DEFAULT )) { + cht_dailink[i].codec_name = drv->codec_name; +break ; } } }
Signature · 1 line
2.17.1
Mark Brown
maintainerApplied "ASoC: Intel: cht_bsw_rt5672: remove useless test" to the asoc tree
The patch
ASoC: Intel: cht_bsw_rt5672: remove useless test
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
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
Quoted 1 line
From
53b6d0adffb0505db5332589e78da1c66f7e626aMon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <[email protected]>
Date: Tue, 29 Jan 2019 09:42:20 -0600
Subject: [PATCH] ASoC: Intel: cht_bsw_rt5672: remove useless test
For some reason we test if the machine is passed as a parameter before fixing up the codec name. This is unnecessary, generates false positives in static analysis tools and done only in this machine driver, remove and adjust indentation.
--- sound/soc/intel/boards/cht_bsw_rt5672.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)
sound/soc/intel/boards/cht_bsw_rt5672.c +9 -12
@@ -411,18 +411,15 @@ static int snd_cht_mc_probe(struct platform_device *pdev)strcpy (drv->codec_name,RT5672_I2C_DEFAULT );/* fixup codec name based on HID */ -if (mach) { - i2c_name =acpi_dev_get_first_match_name (mach->id,NULL ,-1 ); -if (i2c_name) { -snprintf (drv->codec_name,sizeof (drv->codec_name), -"i2c-%s" , i2c_name); -for (i =0 ; i <ARRAY_SIZE (cht_dailink); i++) { -if (!strcmp (cht_dailink[i].codec_name, -RT5672_I2C_DEFAULT )) { - cht_dailink[i].codec_name = - drv->codec_name; -break ; - } + i2c_name =acpi_dev_get_first_match_name (mach->id,NULL ,-1 ); +if (i2c_name) { +snprintf (drv->codec_name,sizeof (drv->codec_name), +"i2c-%s" , i2c_name); +for (i =0 ; i <ARRAY_SIZE (cht_dailink); i++) { +if (!strcmp (cht_dailink[i].codec_name, +RT5672_I2C_DEFAULT )) { + cht_dailink[i].codec_name = drv->codec_name; +break ; } } }
Signature · 1 line
2.20.1