[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 05/17] audio: remove sw == NULL check
From: |
Marc-André Lureau |
Subject: |
Re: [PATCH v2 05/17] audio: remove sw == NULL check |
Date: |
Wed, 22 Feb 2023 14:49:46 +0400 |
On Mon, Feb 6, 2023 at 10:52 PM Volker Rümelin <vr_qemu@t-online.de> wrote:
>
> All call sites of audio_pcm_sw_write() guarantee that sw is not
> NULL. Remove the unnecessary NULL check.
>
> Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> audio/audio.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/audio/audio.c b/audio/audio.c
> index 4412b5fad8..8f1c0e77b0 100644
> --- a/audio/audio.c
> +++ b/audio/audio.c
> @@ -712,10 +712,6 @@ static size_t audio_pcm_sw_write(SWVoiceOut *sw, void
> *buf, size_t size)
> size_t hw_free;
> size_t ret, total;
>
> - if (!sw) {
> - return size;
> - }
> -
> hwsamples = sw->hw->mix_buf.size;
>
> live = sw->total_hw_samples_mixed;
> --
> 2.35.3
>
--
Marc-André Lureau
- [PATCH v2 00/17] audio: improve callback interface for audio frontends, Volker Rümelin, 2023/02/06
- [PATCH v2 01/17] audio: change type of mix_buf and conv_buf, Volker Rümelin, 2023/02/06
- [PATCH v2 02/17] audio: change type and name of the resample buffer, Volker Rümelin, 2023/02/06
- [PATCH v2 03/17] audio: make the resampling code greedy, Volker Rümelin, 2023/02/06
- [PATCH v2 06/17] audio: rename variables in audio_pcm_sw_write(), Volker Rümelin, 2023/02/06
- [PATCH v2 05/17] audio: remove sw == NULL check, Volker Rümelin, 2023/02/06
- Re: [PATCH v2 05/17] audio: remove sw == NULL check,
Marc-André Lureau <=
- [PATCH v2 07/17] audio: don't misuse audio_pcm_sw_write(), Volker Rümelin, 2023/02/06
- [PATCH v2 08/17] audio: remove unused noop_conv() function, Volker Rümelin, 2023/02/06
- [PATCH v2 09/17] audio/mixeng: calculate number of input frames, Volker Rümelin, 2023/02/06
- [PATCH v2 10/17] audio: wire up st_rate_frames_in(), Volker Rümelin, 2023/02/06
- [PATCH v2 11/17] audio: replace the resampling loop in audio_pcm_sw_read(), Volker Rümelin, 2023/02/06