* [PATCH V2][next] ASoC: rt722-sdca: Remove logically deadcode in rt722-sdca.c
@ 2024-10-10 17:57 Everest K.C.
2024-10-10 19:35 ` Shuah Khan
2024-10-11 15:23 ` Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: Everest K.C. @ 2024-10-10 17:57 UTC (permalink / raw)
To: oder_chiou, lgirdwood, broonie, perex, tiwai
Cc: Everest K.C., skhan, linux-sound, linux-kernel
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(-)
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;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V2][next] ASoC: rt722-sdca: Remove logically deadcode in rt722-sdca.c
2024-10-10 17:57 [PATCH V2][next] ASoC: rt722-sdca: Remove logically deadcode in rt722-sdca.c Everest K.C.
@ 2024-10-10 19:35 ` Shuah Khan
2024-10-10 19:36 ` Shuah Khan
2024-10-11 15:23 ` Mark Brown
1 sibling, 1 reply; 4+ messages in thread
From: Shuah Khan @ 2024-10-10 19:35 UTC (permalink / raw)
To: Everest K.C., oder_chiou, lgirdwood, broonie, perex, tiwai
Cc: linux-sound, linux-kernel, Shuah Khan
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V2][next] ASoC: rt722-sdca: Remove logically deadcode in rt722-sdca.c
2024-10-10 19:35 ` Shuah Khan
@ 2024-10-10 19:36 ` Shuah Khan
0 siblings, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2024-10-10 19:36 UTC (permalink / raw)
To: Everest K.C., oder_chiou, lgirdwood, broonie, perex, tiwai
Cc: linux-sound, linux-kernel, Shuah Khan
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V2][next] ASoC: rt722-sdca: Remove logically deadcode in rt722-sdca.c
2024-10-10 17:57 [PATCH V2][next] ASoC: rt722-sdca: Remove logically deadcode in rt722-sdca.c Everest K.C.
2024-10-10 19:35 ` Shuah Khan
@ 2024-10-11 15:23 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2024-10-11 15:23 UTC (permalink / raw)
To: oder_chiou, lgirdwood, perex, tiwai, Everest K.C.
Cc: skhan, linux-sound, linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-11 15:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-10 17:57 [PATCH V2][next] ASoC: rt722-sdca: Remove logically deadcode in rt722-sdca.c Everest K.C.
2024-10-10 19:35 ` Shuah Khan
2024-10-10 19:36 ` Shuah Khan
2024-10-11 15:23 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox