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 3DDE3EB64D9 for ; Mon, 10 Jul 2023 06:56:46 +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 467BE820; Mon, 10 Jul 2023 08:55:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 467BE820 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1688972204; bh=XPCY82oumU9ugSyNNX082btL/K7G7x6rE1EOvn/nyx0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=hU+kSmFI9pLjBz5gIYmQVZzmCUyndHsPkSqq94LsxUT1TEXXtf5JVp2888D2uCi/c AqpX+vi/XtcIHDo69g/7sayg4m5SaQZzqq2S/uXUVy14gPWJRtz4CybtPaIJI+b//p dGl/z+x/7oUY5YGo8VZKk2KGIIDt69ADi3Aae5p0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id AAAF2F800E4; Mon, 10 Jul 2023 08:55:22 +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 5AE56F80249; Mon, 10 Jul 2023 08:55:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B0C6FF80249; Mon, 10 Jul 2023 08:55:17 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A5B9BF800D2 for ; Mon, 10 Jul 2023 08:55:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A5B9BF800D2 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=kp73KadC; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=zq5iNQ5e 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 06B1C21E91; Mon, 10 Jul 2023 06:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688972112; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8unh/fnuzMECiSqBRNJfxodl/hbQnD4NRNcw9okINSs=; b=kp73KadCdd9icphUhQidcD/O2PXpc0oMXTgdrVVGHSilssmv43AbAgQZdpC3N7XKr+OwjX bnsxJwpLd6JFFl2qjlIKXyCM5b+WI4xs/6FBitPJRG+HxpE+vopDQvwL8P2zRMinF1HXXJ 1npKuExyPEinPl9EZkUqtJEHaQBDvro= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688972112; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8unh/fnuzMECiSqBRNJfxodl/hbQnD4NRNcw9okINSs=; b=zq5iNQ5ecR4QryQGhPHitSNP3U5MEK6fRmRB8EIr0A1AIR9+TZmWBKW4uzHG3fc/0ROCtl i6gKg135QNChB0Ag== 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 CD2AB1361C; Mon, 10 Jul 2023 06:55:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qHEXMU+rq2QuYAAAMHmgww (envelope-from ); Mon, 10 Jul 2023 06:55:11 +0000 Date: Mon, 10 Jul 2023 08:55:10 +0200 Message-ID: <87y1joi7ch.wl-tiwai@suse.de> From: Takashi Iwai To: Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= Cc: Ivan Orlov , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, kernel@pengutronix.de Subject: Re: [PATCH 1/2] ALSA: pcmtest: Convert to platform remove callback returning void In-Reply-To: <20230707075058.3402832-1-u.kleine-koenig@pengutronix.de> References: <20230707075058.3402832-1-u.kleine-koenig@pengutronix.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=ISO-8859-1 Content-Transfer-Encoding: 8bit Message-ID-Hash: NN5BW7ZUKIBU7OT5DEWXPYGY5YUPEXZK X-Message-ID-Hash: NN5BW7ZUKIBU7OT5DEWXPYGY5YUPEXZK X-MailFrom: tiwai@suse.de 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 Fri, 07 Jul 2023 09:50:57 +0200, Uwe Kleine-König wrote: > > The .remove() callback for a platform driver returns an int which makes > many driver authors wrongly assume it's possible to do error handling by > returning an error code. However the value returned is ignored (apart > from emitting a warning) and this typically results in resource leaks. > To improve here there is a quest to make the remove callback return > void. In the first step of this quest all drivers are converted to > .remove_new() which already returns void. Eventually after all drivers > are converted, .remove_new() is renamed to .remove(). > > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. > > Signed-off-by: Uwe Kleine-König Applied both patches now. Thanks! Takashi