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 48285C7618E for ; Sat, 22 Apr 2023 15:32:57 +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 D8562EDB; Sat, 22 Apr 2023 17:32:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D8562EDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1682177574; bh=Dm5rrcpu9z/OXTXKaB0sLOoTA4/+rkmNFHSxl5s5Ap0=; h=Date:From:To:Subject:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=fiU3KcuSdQ+Mqrryu3QgJuS59TaltMiEgzbXvI0KQG/DYp0m1sN6xheRBbvmbF6xx pWxvOu3WHnioKl+djU08yvISd7QMcg52yKi5hr2dTQNJvOUmbJyzuu2x4jtsNOWv87 msFYtwmzwjNYdUTN3+02hI9/IJre6yXW57OYUEts= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 1CC6FF800AC; Sat, 22 Apr 2023 17:31:39 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 84391F80155; Sat, 22 Apr 2023 17:31:34 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (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 B8D0DF800AC for ; Sat, 22 Apr 2023 17:31:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B8D0DF800AC 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=MFWfHHBj; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=6nTE3GjU 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 ED7F221A0B; Sat, 22 Apr 2023 15:31:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1682177484; 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=1VxSCizd+tOzdu8VSlfp0/Zw3MANz/LFRMNzZK8emAw=; b=MFWfHHBj7TmZ5kJ+vg/GjEvVYXITPK3hQQrd1TfWW+zMnd5hp3K3pErzeDk6jFjZqdv1qi aSV5gQPXuVHMnpwWM1iNR6D9ofP4wkQU9I+/Ed08eKYullLe5CCnpXgqj5kQ9jYQwX0FJE j6nBpJ2UfiUWJCedVLZ3vTnU7M9To7Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1682177484; 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=1VxSCizd+tOzdu8VSlfp0/Zw3MANz/LFRMNzZK8emAw=; b=6nTE3GjUdoF6zW8zmhk1rkUBHfvAUIGR8mT6V6/YYhtC+KZKpDqV2kkWzJyCqUU+nuCdGd 4bDwNrvEROcyZSBQ== 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 CACCC13499; Sat, 22 Apr 2023 15:31:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id dA0UMMz9Q2SYUAAAMHmgww (envelope-from ); Sat, 22 Apr 2023 15:31:24 +0000 Date: Sat, 22 Apr 2023 17:31:24 +0200 Message-ID: <87ildoorw3.wl-tiwai@suse.de> From: Takashi Iwai To: Oswald Buddenhagen Subject: Re: [PATCH] ALSA: emu10k1: fix error codes In-Reply-To: References: <20230421172623.1017222-1-oswald.buddenhagen@gmx.de> <87y1mkpdf3.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 Message-ID-Hash: FBSN2EFGCEUNTADKIALLKEB637TBOW3R X-Message-ID-Hash: FBSN2EFGCEUNTADKIALLKEB637TBOW3R 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 CC: alsa-devel@alsa-project.org 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 Sat, 22 Apr 2023 14:04:36 +0200, Oswald Buddenhagen wrote: > > On Sat, Apr 22, 2023 at 09:46:24AM +0200, Takashi Iwai wrote: > > On Fri, 21 Apr 2023 19:26:23 +0200, Oswald Buddenhagen wrote: > >> One might argue that this potentially breaks user space, but a) > >> this is > >> just one driver among many, so it seems unlikely that someone would > >> expect (only) the broken codes and b) it seems unlikely that someone > >> would check these syscalls for particular errors at all, rather than > >> just logging them (this might be debatable for the voice allocator > >> calls). > > > > I find this is too risky for really little win. > > > yes, the gain is relatively low. it merely means applications > displaying somewhat less confusing error messages. > > > The error code is > > returned to user space in quite many cases; e.g. the voice allocator > > is called from PCM hw_params, too, and that's most of user-space > > programs do actually check. It could be a surprise if it's changed > > without much reason, may trigger unexpected behavior changes. > > > of course. hypothetically. > but these aren't error codes around which specific error recovery > would exist. > codes that actually _have_ error recovery built around them tend to be > already correct, because people actually tried using them and noticed > mistakes in time. Yes, but remember that they adapt how the existing code behaves; so even if EBUSY might appears like a better fit, a different error code may bring unexpected outcome. User space programs can do every crazy thing, so never underestimate a subtle change if it's visible -- that's what I've learned from the long development history. Especially true, if the stuff is a very old one like this. That said, I wouldn't mind changing if it's about a new driver code. But this isn't such a case. > > Of course, if the error code must be corrected, we can fix it. > > But I don't see it in this patch description. > > > i can provide a rationale for each of the changes, even though i think > that the patch context speaks for itself - the theme is always "return > an error code whose description better reflects the situation being > reported". > but none of that would change the fact that it would break code that > was specifically designed to rely on this driver's bogus behavior. i > just don't think such code exists, because that wouldn't make any > sense. > so i don't know what your criteria for "must be corrected" are. So my take is rather to skip this. thanks, Takashi