From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 466E2CA0FF8 for ; Sat, 2 Sep 2023 05:38:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id ECAE974C; Sat, 2 Sep 2023 07:37:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ECAE974C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1693633087; bh=8o7cvGLe+z77t3Y1h1UNmdHueNdKn02gQA5hcc5WNVI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gbxbuhupwyJRC3WAcF5KITvBmpRmaUaW2G2tycWIZ5n9HK/9aCuR5ex/7YMyPsJ0q Zf6hZ24ykVIMlnxFcZ+je7GbHAwGgJJzBMZENDmIwG5jWZZDGkxl411BTTB4cTRWB5 gIGVTdEXQlV9YvR6gPs/1SghHJ73lzxlKTlcQxuo= Received: by alsa1.perex.cz (Postfix, from userid 50401) id EDEA1F804DA; Sat, 2 Sep 2023 07:36:57 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 287CDF800F5; Sat, 2 Sep 2023 07:36:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C4B02F804DA; Sat, 2 Sep 2023 07:36:52 +0200 (CEST) Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 55580F800F5 for ; Sat, 2 Sep 2023 07:36:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 55580F800F5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linux.org.uk header.i=@linux.org.uk header.a=rsa-sha256 header.s=zeniv-20220401 header.b=scBXjhLb DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=k+4m61B+T03hiC954QP7GIZExi9kv0zhekPgpjawNLA=; b=scBXjhLbYBOZaH7N/THyCiY+6L kCQlrczQODtFSUayXdP0gL3FV2flKOeSoHpX/up4VpcxSfAWJjttw+B9pDW42S8gUzBONdDtSRpf9 mWaSf1iObrw0efiM3bXielVVq7C1u/Ti7IgJ+CXZPkCgW8hYKX6fPDEVHS5MSih/th6TfeoALLtRX yn3EtVcHY1DjfPPh90vz/L6adXrbjjCjAAh95/483aq0oHK+heFjfS4MiSqo1cNjRk1CfvY0o/bCa senv2C9z+L2ZZpBFnVZHAaWJe1Mduv4aE77+KO1istkR1ifgaHKiBx7XBkKNfvoiunWGcjKqTnnQI LyuYexqA==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1qcJJP-002kzQ-01; Sat, 02 Sep 2023 05:36:47 +0000 Date: Sat, 2 Sep 2023 06:36:46 +0100 From: Al Viro To: Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 06/25] ALSA: emu8000: Convert to generic PCM copy ops Message-ID: <20230902053646.GK3390869@ZenIV> References: <20230815190136.8987-1-tiwai@suse.de> <20230815190136.8987-7-tiwai@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230815190136.8987-7-tiwai@suse.de> Sender: Al Viro Message-ID-Hash: GGK4LW7WCFWLXMGCG4BMPYO3S5I4JGEH X-Message-ID-Hash: GGK4LW7WCFWLXMGCG4BMPYO3S5I4JGEH X-MailFrom: viro@ftp.linux.org.uk X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, Aug 15, 2023 at 09:01:17PM +0200, Takashi Iwai wrote: > + else if (copy_from_iter(&sval, 2, iter) != 2) \ > + return -EFAULT; \ copy_from_iter_full()? > -static int emu8k_pcm_copy_kernel(struct snd_pcm_substream *subs, > - int voice, unsigned long pos, > - void *src, unsigned long count) > -{ > - struct snd_emu8k_pcm *rec = subs->runtime->private_data; > - > - /* convert to word unit */ > - pos = (pos << 1) + rec->loop_start[voice]; > - count <<= 1; > - LOOP_WRITE(rec, pos, src, count, COPY_KERNEL); > + LOOP_WRITE(rec, pos, src, count); > return 0; > } > > @@ -483,16 +456,15 @@ static int emu8k_pcm_silence(struct snd_pcm_substream *subs, > /* convert to word unit */ > pos = (pos << 1) + rec->loop_start[voice]; > count <<= 1; > - LOOP_WRITE(rec, pos, NULL, count, FILL_SILENCE); > + LOOP_WRITE(rec, pos, USER_SOCKPTR(NULL), count); USER_SOCKPTR?