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 0E4CDC0015E for ; Tue, 1 Aug 2023 13:59:33 +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 8E1323E7; Tue, 1 Aug 2023 15:58:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8E1323E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1690898371; bh=ZKIy+hH5QB+KBuMy5Vbg4Dhcb8h2GptMzqQNMbJ5fGU=; 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=vdWCy+/gZ8jPvKN1hy2i5JAcazVd8YD7olUGHmC7NSs8AxSQySporHWbAxyvCUUyI jQtLGac2EBjSSDLmjxNky+Ag8+GWmAx4D3i4OeZlXH8DtdXdCIJj0muL2sb50vAenq mtrTtrDz3UWmYmecYbGuPkwHyxKNMooTYL+pr+b0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id DFAFBF80149; Tue, 1 Aug 2023 15:58:34 +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 381D6F80087; Tue, 1 Aug 2023 15:58:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5F4E4F801D5; Tue, 1 Aug 2023 15:58:30 +0200 (CEST) Received: from mgamail.intel.com (unknown [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CEB10F80149 for ; Tue, 1 Aug 2023 15:58:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CEB10F80149 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=NYrXXU5j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690898305; x=1722434305; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ZKIy+hH5QB+KBuMy5Vbg4Dhcb8h2GptMzqQNMbJ5fGU=; b=NYrXXU5jr3WGwmh2Wz+N0FR0UXMVZgqo/t//gINB87bBJft8BKnX8jP8 JBAPlVEc5FqpeBZPpl7gRAkpULoXz+d6wB22iFwOeDBWpKRO4DDyz1unN /M/BQ4pIuJASTdiMumkExGKZbmstNELRjA8qzZXntDH+MI+rUHLnSyZgY kS4G+HEg5N72i7mEGHce5Efl88bYQFpr9WJshqtcYvX8yZSKlldJ00UFB oQKzLK5vIwGzEEbfUsqLUFXq+fOIT+WwylycbPYudk3UlPG4AWpMxRuB9 FtmnDa4rOaFqsrBlbk5+UXGhAJKsyFG+tudHpYv49oZdCg+04nEgiDNxz Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10789"; a="400250893" X-IronPort-AV: E=Sophos;i="6.01,247,1684825200"; d="scan'208";a="400250893" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2023 06:57:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10789"; a="763772313" X-IronPort-AV: E=Sophos;i="6.01,247,1684825200"; d="scan'208";a="763772313" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga001.jf.intel.com with ESMTP; 01 Aug 2023 06:57:55 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qQpsm-005MX9-2k; Tue, 01 Aug 2023 16:57:52 +0300 Date: Tue, 1 Aug 2023 16:57:52 +0300 From: Andy Shevchenko To: Takashi Iwai Cc: Mark Brown , alsa-devel@alsa-project.org, 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 Message-ID: References: <20230731154718.31048-1-tiwai@suse.de> <87h6pjj2ui.wl-tiwai@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h6pjj2ui.wl-tiwai@suse.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Message-ID-Hash: UOHGEUUJJPKYJ3YLHSCYCIEFPO2WBGF7 X-Message-ID-Hash: UOHGEUUJJPKYJ3YLHSCYCIEFPO2WBGF7 X-MailFrom: andriy.shevchenko@linux.intel.com 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 Mon, Jul 31, 2023 at 09:30:29PM +0200, Takashi Iwai wrote: > 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... Maybe we should define a genptr_t (in genptr.h) and convert sockptr infra to use it (in sockptr.h)? This will leave network and other existing users to convert to it step-by-step. Another approach is to simply copy sockptr.h to genptr.h with changed naming scheme and add a deprecation note to the former. Thank you, Takashi, for doing this! -- With Best Regards, Andy Shevchenko