Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10731495rwp; Fri, 21 Jul 2023 04:13:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlH0cBzbwtZnB22D9rKTd0ikApE62RYsnz3I3j8kGcuwEEmjTj2N43MZKqqJ3AzawKpsEUFq X-Received: by 2002:a17:907:78d8:b0:974:55ea:1ad8 with SMTP id kv24-20020a17090778d800b0097455ea1ad8mr1607380ejc.63.1689938027360; Fri, 21 Jul 2023 04:13:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689938027; cv=none; d=google.com; s=arc-20160816; b=Tt0eOGTxn1aZFR7t2ttIb17+5RKfYjIr1xfQM6VFYyhr5jVaGLO7UBZu7Oe0a1N2gH SUsWtKzKJT4U5Q/zqgI5pCHRUCtIArjaDY5iHui1oT59q3cI5RJSYQmDIm/bEm5iIOMF 2niYQdooQdoKU5CflJmJ4Xaa58/X54q1aSJ3a1CJqnhhiVRrTaQtsBcY3XpaeMPRWJcj gQtOElKFoOgv1d71HRyLGdFlN5o6wQ45Gce+drlMl6r5btZopiXiz2//SXV4rdkxLaSS 6VGulcOqh7kF+DG80ulMzlwPQtCf4aMeUFiLHRGsAStI+MAv6DCSY8HR3PJoF1P2roKR ppDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=ENY78oLHZhOAC6EECfepl0Erw4YArx4QCjqh+tXANK0=; fh=wqYxEPYBezYUGOgBsTpeNqcUccS4oguhg+YVLMrNbVA=; b=FAz+Jg+P0S5mUpZ9UCvuZ7qH0DDk4JX1/6AEy1jDp4B7I2UQLqb7uLouXmIvGfEskA JRYtmxpwdhcnpqNOAjfAcrdKA4uDyqsLwEzuMJu4ZJV7PS4veh96quCwmbGb9h9FvJ3o /89XF/tGR9babrrqEc8/dzE7dCdfuJqj2n3gubNQuA0XlOW+0j9+9pvWCrRGjZxtPNDT neJGuYTs/zmPqoIA6wkX8MK0p00fm7mmCUOPe/BHBCyIeUiRIJKm6DhSmprkOyjW12q4 rUSnOsevr/wCGUZgYRymmysC8vyUuj+aMW6OOjZ48Ajl4x/+S+7QNw3cl9WIs4RfXIym j1ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=I80gSmkz; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=uQYJg3Aq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gf4-20020a170906e20400b0098e444cba76si2036223ejb.91.2023.07.21.04.13.22; Fri, 21 Jul 2023 04:13:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=I80gSmkz; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=uQYJg3Aq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231357AbjGUK64 (ORCPT + 99 others); Fri, 21 Jul 2023 06:58:56 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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