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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54360C001DF for ; Fri, 21 Jul 2023 10:58:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231475AbjGUK65 (ORCPT ); Fri, 21 Jul 2023 06:58:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230465AbjGUK6i (ORCPT ); Fri, 21 Jul 2023 06:58:38 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCC2D30C4 for ; Fri, 21 Jul 2023 03:58:16 -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-out1.suse.de (Postfix) with ESMTPS id 27D38218A2; Fri, 21 Jul 2023 10:58:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1689937095; 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=ENY78oLHZhOAC6EECfepl0Erw4YArx4QCjqh+tXANK0=; b=I80gSmkzJ17c7Nu4x7K/fZ1MrznmIQCuFpaaQ4S7eKp+IclkbJgHdpQ3DAg2JFagWXJrbw 7AYHZNRw+fDCkEMFBQdHcHHSfnrp+8qkR6WEH6DbH/kCze3qbeW+87NJLwuZOxSvUr2Zf5 n3gOaw5Gu2i0KpiI1rQGMbI9HClY75s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1689937095; 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=ENY78oLHZhOAC6EECfepl0Erw4YArx4QCjqh+tXANK0=; b=uQYJg3AqvG0VksuvoOS88sM8MrUmGC9CpFFDtJx3t0ezu6hfYEb6PmcejdP9CjA7Niqc23 krr7x36TlPqlnxCg== 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 F0F36134B0; Fri, 21 Jul 2023 10:58:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qqzzOcZkumRBHwAAMHmgww (envelope-from ); Fri, 21 Jul 2023 10:58:14 +0000 Date: Fri, 21 Jul 2023 12:58:14 +0200 Message-ID: <87y1j9fs55.wl-tiwai@suse.de> From: Takashi Iwai To: Andy Shevchenko Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Jaroslav Kysela , Takashi Iwai , Dan Williams Subject: Re: [PATCH v1 1/1] ALSA: korg1212: Re-use sockptr_t and respective APIs In-Reply-To: References: <20230721100146.67293-1-andriy.shevchenko@linux.intel.com> <878rb9h901.wl-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-kernel@vger.kernel.org On Fri, 21 Jul 2023 12:42:08 +0200, Andy Shevchenko wrote: > > On Fri, Jul 21, 2023 at 12:08:46PM +0200, Takashi Iwai wrote: > > On Fri, 21 Jul 2023 12:01:46 +0200, > > Andy Shevchenko wrote: > > > > > > The sockptr_t (despite the naming) is a generic type to hold kernel > > > or user pointer and there are respective APIs to copy data to or > > > from it. Replace open coded variants in the driver by them. > > > > While I see the benefit, I feel this is very confusing. If we use the > > API for a generic use, it should be renamed at first. > > > > Also, the current function actually follows the call pattern, and we > > know in the caller side whether it's called for a kernel pointer or a > > user pointer. So, if any, the PCM core callbacks should be revised to > > use a generic pointer instead of fiddling in each driver side. > > Any suggestion for the name? It's a universal pointer... uniptr_t? Or a generic pointer, genptr_t? I'm not good at naming, and I'm open for it. > And I believe for the bigger series the new callback should be added first. Yes. Takashi