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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A7DEC001DE for ; Mon, 31 Jul 2023 19:30:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230025AbjGaTai (ORCPT ); Mon, 31 Jul 2023 15:30:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229768AbjGaTah (ORCPT ); Mon, 31 Jul 2023 15:30:37 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB92E171B for ; Mon, 31 Jul 2023 12:30:31 -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 62B401F8B9; Mon, 31 Jul 2023 19:30:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1690831830; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=u7USeY0/jtJxkYj9/QN1XyAb2M3n3eeaiC5yDhmFdY8=; b=wfOQ7CjFJqQePEa7OdDroF7echFEOEHR/6vLvlCgaHsMGc5p3jgEArAk5dc0jkq2W2SGSy GfcClBPxAOQ6E6Gw1fQREbSQEwYnUAY2Evc0hsf6IqB3iyr3y0XmXAGuhNYxL7mMHBbSJS 2BCLtuk3fcVYke+aItcBz9RgRJ2HhEM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1690831830; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=u7USeY0/jtJxkYj9/QN1XyAb2M3n3eeaiC5yDhmFdY8=; b=Qd4OrjEGeQ8Yv2c20NXO+uRfjaHL2ARq+fEgYKcKp+AaD4GHakZdhSu2htPkHeqG/+cw+Y 6ecdtJBy3k+qWYAA== 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 F4174133F7; Mon, 31 Jul 2023 19:30:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4dSvOtULyGTxYAAAMHmgww (envelope-from ); Mon, 31 Jul 2023 19:30:29 +0000 Date: Mon, 31 Jul 2023 21:30:29 +0200 Message-ID: <87h6pjj2ui.wl-tiwai@suse.de> From: Takashi Iwai To: Mark Brown Cc: alsa-devel@alsa-project.org, Andy Shevchenko , Andrey Utkin , Anton Sviridenko , Arnaud Pouliquen , Banajit Goswami , Bluecherry Maintainers , Claudiu Beznea , Ismael Luceno , Lars-Peter Clausen , Mauro Carvalho Chehab , Oleksandr Andrushchenko , Olivier Moysan , Srinivas Kandagatla , linux-media@vger.kernel.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH 00/24] ALSA: Generic PCM copy ops using sockptr_t In-Reply-To: References: <20230731154718.31048-1-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Mon, 31 Jul 2023 19:20:54 +0200, Mark Brown wrote: > > On Mon, Jul 31, 2023 at 05:46:54PM +0200, Takashi Iwai wrote: > > > this is a patch set to clean up the PCM copy ops using sockptr_t as a > > "universal" pointer, inspired by the recent patch from Andy > > Shevchenko: > > https://lore.kernel.org/r/20230721100146.67293-1-andriy.shevchenko@linux.intel.com > > > Even though it sounds a bit weird, sockptr_t is a generic type that is > > used already in wide ranges, and it can fit our purpose, too. With > > sockptr_t, the former split of copy_user and copy_kernel PCM ops can > > be unified again gracefully. > > It really feels like we ought to rename, or add an alias for, the type > if we're going to start using it more widely - it's not helping to make > the code clearer. That was my very first impression, too, but I changed my mind after seeing the already used code. An alias might work, either typedef or define genptr_t or such as sockptr_t. But we'll need to copy the bunch of helper functions, too... Takashi