Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2725341imm; Tue, 4 Sep 2018 09:02:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbDLsjjqQtjhs+MbQ9pzGNpSvOYqgov5zuot6WQcRFHNlRZT8DcayHzO6DF1Qi3CAytKRvQ X-Received: by 2002:a63:c702:: with SMTP id n2-v6mr32584178pgg.108.1536076950277; Tue, 04 Sep 2018 09:02:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536076950; cv=none; d=google.com; s=arc-20160816; b=hrz1fnz+WS8kNFge07poXQ69t8qBpi+ZMpt4/KIqDngCWZnmjhcApFrr9T28hb4+Qq LiuqVZz0PaJfcq5uemMLUfHAj2Ros1LsacSI6FQy+oGcRcAzzyx2YNRySVDDe2YJdAcv HDEf7l2LNZn1/1TFBUIXRq73PzDUz8OPVAsVZMaOplVKLMfe88jGo7PNhtXab8aURryK QNfXRBYVnGeolQvVd668i2JEFtgk8lfTPlQePBVM1DWGprNF29jqXPWiqkVesMfzzngY qIVTJZk0yOhns87WHxkuMziPtZYUdJp6KmZzxdO5xmp0DbC9GZY4ThtaREiiQQjynr0r pmhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=WAucEQen4bqrxzJGvMgUB/OLNMyjbpNnJ0QuUxqhkm8=; b=occ3AdBRYFCakdvWdz+0EeaqiG33zQ0reHeAxP3R9brJtFjGo7HKmTFDFzIAXUSBv+ 7zE3bzQmI/1H1PPssHVx3ZlfnTBZWNvhewrr04zdVW46KVumn3aytqlDNC3Q1HWk0s1r 7bO4pgjuLUiDkfd3+XLtnbxVuXDYdj9BTGyBEgsK61lkxHpT7x7v7fSzBaWzOht4cbo8 mDJbUIztlyrb6BcbVRnnzpYl5psxL1Y+vEcDdXtSrwt9ZHFdu76P+OPGa2fsoGfQdc3T ygCnaXQEd/nfrscpdMg6cvSweClFQhQIpo9gdHwUu6d23Y/NYNgn7XNNN8IySie98vAp NBuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11-v6si21040951pgm.509.2018.09.04.09.02.08; Tue, 04 Sep 2018 09:02:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727828AbeIDUYu (ORCPT + 99 others); Tue, 4 Sep 2018 16:24:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:50960 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727615AbeIDUYt (ORCPT ); Tue, 4 Sep 2018 16:24:49 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D88D1B0A2; Tue, 4 Sep 2018 15:59:01 +0000 (UTC) From: Takashi Iwai To: Greg Kroah-Hartman Cc: Eric Anholt , Stefan Wahren , linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/29] staging: bcm2835-audio: Remove redundant function calls Date: Tue, 4 Sep 2018 17:58:35 +0200 Message-Id: <20180904155858.8001-7-tiwai@suse.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180904155858.8001-1-tiwai@suse.de> References: <20180904155858.8001-1-tiwai@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org bcm2835_audio_setup(), bcm2835_audio_flush_buffers() and bcm2835_audio_flush_playback_buffers() functions do implement nothing. Also, bcm2835_audio_set_ctls() is already called inside bcm2835_audio_set_params(), so the later call is superfluous. This patch removes these superfluous implementations. Signed-off-by: Takashi Iwai --- .../vc04_services/bcm2835-audio/bcm2835-pcm.c | 5 ----- .../bcm2835-audio/bcm2835-vchiq.c | 21 ------------------- .../vc04_services/bcm2835-audio/bcm2835.h | 3 --- 3 files changed, 29 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c index 9a79d2267df4..a3ab5bfea08a 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c @@ -277,11 +277,6 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) if (err < 0) audio_error(" error setting hw params\n"); - bcm2835_audio_setup(alsa_stream); - - /* in preparation of the stream, set the controls (volume level) of the stream */ - bcm2835_audio_set_ctls(alsa_stream); - memset(&alsa_stream->pcm_indirect, 0, sizeof(alsa_stream->pcm_indirect)); alsa_stream->pcm_indirect.hw_buffer_size = diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c index 8684dc1d0b41..488e676e25e1 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c @@ -580,12 +580,6 @@ int bcm2835_audio_set_params(struct bcm2835_alsa_stream *alsa_stream, return ret; } -int bcm2835_audio_setup(struct bcm2835_alsa_stream *alsa_stream) -{ - - return 0; -} - static int bcm2835_audio_start_worker(struct bcm2835_alsa_stream *alsa_stream) { struct vc_audio_msg m; @@ -774,21 +768,6 @@ static int bcm2835_audio_write_worker(struct bcm2835_alsa_stream *alsa_stream, return ret; } -/** - * Returns all buffers from arm->vc - */ -void bcm2835_audio_flush_buffers(struct bcm2835_alsa_stream *alsa_stream) -{ -} - -/** - * Forces VC to flush(drop) its filled playback buffers and - * return them the us. (VC->ARM) - */ -void bcm2835_audio_flush_playback_buffers(struct bcm2835_alsa_stream *alsa_stream) -{ -} - unsigned int bcm2835_audio_retrieve_buffers(struct bcm2835_alsa_stream *alsa_stream) { unsigned int count = atomic_read(&alsa_stream->retrieved); diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h index 8ee25a837b08..d2441916960d 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h @@ -158,7 +158,6 @@ int bcm2835_audio_close(struct bcm2835_alsa_stream *alsa_stream); int bcm2835_audio_set_params(struct bcm2835_alsa_stream *alsa_stream, unsigned int channels, unsigned int samplerate, unsigned int bps); -int bcm2835_audio_setup(struct bcm2835_alsa_stream *alsa_stream); int bcm2835_audio_start(struct bcm2835_alsa_stream *alsa_stream); int bcm2835_audio_stop(struct bcm2835_alsa_stream *alsa_stream); int bcm2835_audio_set_ctls(struct bcm2835_alsa_stream *alsa_stream); @@ -167,7 +166,5 @@ int bcm2835_audio_write(struct bcm2835_alsa_stream *alsa_stream, void *src); void bcm2835_playback_fifo(struct bcm2835_alsa_stream *alsa_stream); unsigned int bcm2835_audio_retrieve_buffers(struct bcm2835_alsa_stream *alsa_stream); -void bcm2835_audio_flush_buffers(struct bcm2835_alsa_stream *alsa_stream); -void bcm2835_audio_flush_playback_buffers(struct bcm2835_alsa_stream *alsa_stream); #endif /* __SOUND_ARM_BCM2835_H */ -- 2.18.0