Message ID | 20241010175755.5278-1-everestkc@everestkc.com.np (mailing list archive) |
---|---|
State | Accepted |
Commit | 22206e569fb54bf9c95db9a0138a7485ba9e13bc |
Headers | show |
Series | [V2,next] ASoC: rt722-sdca: Remove logically deadcode in rt722-sdca.c | expand |
On 10/10/24 11:57, Everest K.C. wrote: > As the same condition was checked in inner and outer if statements. > The code never reaches the inner else statement. > Fix this by removing the logically dead inner else statement. > > Fixes: 7f5d6036ca00 ("ASoC: rt722-sdca: Add RT722 SDCA driver") > Reported-by: Shuah Khan <skhan@linuxfoundation.org> > Closes: https://lore.kernel.org/all/e44527e8-b7c6-4712-97a6-d54f02ad2dc9@linuxfoundation.org/ > Signed-off-by: Everest K.C. <everestkc@everestkc.com.np> > --- > V1 -> V2: Added [next] tag > You don't need next tag for this. This patch is in the mainline. thanks, -- Shuah
On 10/10/24 13:35, Shuah Khan wrote: > On 10/10/24 11:57, Everest K.C. wrote: >> As the same condition was checked in inner and outer if statements. >> The code never reaches the inner else statement. >> Fix this by removing the logically dead inner else statement. >> >> Fixes: 7f5d6036ca00 ("ASoC: rt722-sdca: Add RT722 SDCA driver") >> Reported-by: Shuah Khan <skhan@linuxfoundation.org> >> Closes: https://lore.kernel.org/all/e44527e8-b7c6-4712-97a6-d54f02ad2dc9@linuxfoundation.org/ >> Signed-off-by: Everest K.C. <everestkc@everestkc.com.np> >> --- >> V1 -> V2: Added [next] tag >> > > You don't need next tag for this. This patch is in the mainline. Sorry meant to say this source file is in the mainline. You v1 is sufficient. thanks, -- Shuah
On Thu, 10 Oct 2024 11:57:54 -0600, Everest K.C. wrote: > As the same condition was checked in inner and outer if statements. > The code never reaches the inner else statement. > Fix this by removing the logically dead inner else statement. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: rt722-sdca: Remove logically deadcode in rt722-sdca.c commit: 22206e569fb54bf9c95db9a0138a7485ba9e13bc 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
diff --git a/sound/soc/codecs/rt722-sdca.c b/sound/soc/codecs/rt722-sdca.c index e5bd9ef812de..f9f7512ca360 100644 --- a/sound/soc/codecs/rt722-sdca.c +++ b/sound/soc/codecs/rt722-sdca.c @@ -607,12 +607,8 @@ static int rt722_sdca_dmic_set_gain_get(struct snd_kcontrol *kcontrol, if (!adc_vol_flag) /* boost gain */ ctl = regvalue / boost_step; - else { /* ADC gain */ - if (adc_vol_flag) - ctl = p->max - (((vol_max - regvalue) & 0xffff) / interval_offset); - else - ctl = p->max - (((0 - regvalue) & 0xffff) / interval_offset); - } + else /* ADC gain */ + ctl = p->max - (((vol_max - regvalue) & 0xffff) / interval_offset); ucontrol->value.integer.value[i] = ctl; }
As the same condition was checked in inner and outer if statements. The code never reaches the inner else statement. Fix this by removing the logically dead inner else statement. Fixes: 7f5d6036ca00 ("ASoC: rt722-sdca: Add RT722 SDCA driver") Reported-by: Shuah Khan <skhan@linuxfoundation.org> Closes: https://lore.kernel.org/all/e44527e8-b7c6-4712-97a6-d54f02ad2dc9@linuxfoundation.org/ Signed-off-by: Everest K.C. <everestkc@everestkc.com.np> --- V1 -> V2: Added [next] tag sound/soc/codecs/rt722-sdca.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)