Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2556937rdg; Mon, 14 Aug 2023 06:27:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+aVfHJw9thBNOXicwmkV8ZojnvAqVoxE27r2t/Mqeq0jHgdcfxDXEwGnY5BXss8ahKPS6 X-Received: by 2002:a17:907:a069:b0:99b:ed44:1a79 with SMTP id ia9-20020a170907a06900b0099bed441a79mr7802321ejc.3.1692019670065; Mon, 14 Aug 2023 06:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692019670; cv=none; d=google.com; s=arc-20160816; b=ATSlDsuf/XshvNcNBsKwRZSLAehGtxTVn9iItpPczcBVhdNj5SPNM8RNloiNdlCGZP nQHwL/nGCDnZvnsO9tWfchCUsEm2ZviKYuVCOnllj/44N5SBzzQh79pmVQz1gUoKHGS6 Mc7IHRJKDHVfMrW1PaD1thA8t3GZwOZw0XIc+8GnFQR9nVIWpJg9wMBmNDWC5RRdyD0B mZ7PPglT6NQgfu9+/vbe3cnyTSWP0OvmaOSQUOQSUwD0+j45eYGpYn6wC1pqkTRqCUeO FSS5B20Br/HJOh+D0jRjaDstIvYhLd1r3SXXb/Yq513ri1QMHfQxUYPftmhE+CCdjnhx 6j4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=jMyTH+n/x40PlmiWqQalwBgzt2srwvf1AihY+ppT2RY=; fh=DP61/jJCya+1W1X7P2vK6pKSD4lkczCotBkmA6jh/us=; b=HgxFDTlzSppkNal6JQE92XJziMdsudW3l9baLao5KI4SBofA9BMyE5Zt1NErXUJzP/ 3xNa/PN1EH7Yf/2U9y8ksOvmbKMjBLZn8kYVNL550hXmrqacXGeczC69+4geK45CVTsh cCDeiDWwfGCoAcz6JyeDRcizLNz30dyrCHIWUC/IYIa3PBYCltP8mUiSOzk8NyVLDIQo VTYK55FhG7yeJN3qbVQIMNLMzF3KN3ncfZCmIpt0VlXq7QXdjSdRlTBjuobfxbNAh3UP +X+0ABNKgKTD83OdPeUWktYd7dG+QL12Jqw50m4PugHyuQpwYj82uBWezMPmfS0YbzS6 5shg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=07lUyFsb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=MZRl7f8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020a1709062f8900b00984f07f9bc1si8224210eji.395.2023.08.14.06.27.25; Mon, 14 Aug 2023 06:27:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=07lUyFsb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=MZRl7f8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232643AbjHNL47 (ORCPT + 99 others); Mon, 14 Aug 2023 07:56:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232132AbjHNL43 (ORCPT ); Mon, 14 Aug 2023 07:56:29 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA73610E5 for ; Mon, 14 Aug 2023 04:56:12 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A62571F7AB; Mon, 14 Aug 2023 11:55:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1692014145; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jMyTH+n/x40PlmiWqQalwBgzt2srwvf1AihY+ppT2RY=; b=07lUyFsb5dTl2xHhgSqJ1E+hZf+Jig7MzmZEIyBGcaf2r5F+2q6f73t7WWK0zmMI/mhfSd yD0TmWX2JL2xPZg2/JgHHIyWMY8aJkyZA4zVLrEA+UwrDBOci032N4EEpN3YVMbWv3A0Rq EsUFjhYtimGDGd32a9yk2jSfBwNSO9M= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1692014145; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jMyTH+n/x40PlmiWqQalwBgzt2srwvf1AihY+ppT2RY=; b=MZRl7f8oMgZvKHP6RqrJ0d6wlOLzHHbC3rqulgZ1s6paIGYioqG8Ki3vq+1NtAGjIgU6jH wkx4SjgsMM5FW3CA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 803A5138EE; Mon, 14 Aug 2023 11:55:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KARmHUEW2mRnMAAAMHmgww (envelope-from ); Mon, 14 Aug 2023 11:55:45 +0000 From: Takashi Iwai To: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org, Takashi Iwai Subject: [PATCH 04/25] ALSA: dummy: Convert to generic PCM copy ops Date: Mon, 14 Aug 2023 13:55:02 +0200 Message-Id: <20230814115523.15279-5-tiwai@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230814115523.15279-1-tiwai@suse.de> References: <20230814115523.15279-1-tiwai@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch converts the dummy driver code to use the new unified PCM copy callback. As dummy driver doesn't do anything in the callback, it's just a simple replacement. Signed-off-by: Takashi Iwai --- sound/drivers/dummy.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 9c17b49a2ae1..4317677ba24a 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -626,14 +626,7 @@ static int alloc_fake_buffer(void) static int dummy_pcm_copy(struct snd_pcm_substream *substream, int channel, unsigned long pos, - void __user *dst, unsigned long bytes) -{ - return 0; /* do nothing */ -} - -static int dummy_pcm_copy_kernel(struct snd_pcm_substream *substream, - int channel, unsigned long pos, - void *dst, unsigned long bytes) + struct iov_iter *iter, unsigned long bytes) { return 0; /* do nothing */ } @@ -667,8 +660,7 @@ static const struct snd_pcm_ops dummy_pcm_ops_no_buf = { .prepare = dummy_pcm_prepare, .trigger = dummy_pcm_trigger, .pointer = dummy_pcm_pointer, - .copy_user = dummy_pcm_copy, - .copy_kernel = dummy_pcm_copy_kernel, + .copy = dummy_pcm_copy, .fill_silence = dummy_pcm_silence, .page = dummy_pcm_page, }; -- 2.35.3