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 396CBC0015E for ; Tue, 1 Aug 2023 13:58:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231219AbjHAN6Z (ORCPT ); Tue, 1 Aug 2023 09:58:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230305AbjHAN6W (ORCPT ); Tue, 1 Aug 2023 09:58:22 -0400 Received: from mgamail.intel.com (unknown [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C24AC3 for ; Tue, 1 Aug 2023 06:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690898301; x=1722434301; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ZKIy+hH5QB+KBuMy5Vbg4Dhcb8h2GptMzqQNMbJ5fGU=; b=U6/YBzf7lB6RYuyYSxAExsByVn7QW2NGueLJJH6O+RSvyuahELGb7R+4 kBjuCwncotKI9C06xC+yBiqp7qjChZYxO22ypQ8kkmFZk+rmkPB2onIRD GbLGLOUTTjomWQ8QuNtt5qz2LitvepQ7ucy8ofqEnay5uKa/F2GNT+jpf 7vjpB87NlLmE2UMJeimlto6EVjFEpvF5a+ZzTsmrgNSBHLGnmzpWzWxoa 9hwLnkOBeTphdkuFoMkD1dUefyx4/pbJZVOmTfpeg45SvZamu7NG04gKT XhspAMsw1zalVHJDqa6s9cy6+Ma+WQMTr8GRxzWUxQnuE1rGeyTFMT4GB w==; X-IronPort-AV: E=McAfee;i="6600,9927,10789"; a="400250891" X-IronPort-AV: E=Sophos;i="6.01,247,1684825200"; d="scan'208";a="400250891" 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 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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