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 AAAC6C77B71 for ; Tue, 18 Apr 2023 06:03:38 +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 60849DF1; Tue, 18 Apr 2023 08:02:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 60849DF1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1681797815; bh=GZGipckXsgpdXi3IyyUya1eUofAhtn6hXvNQNVh38vA=; 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=T9x7eSaCw6YD5Aj4EkkPJ/RkcgjAHwdR5blOaFXGO2IxXx1M4mR3vLW97Jo6uw0g7 30PromW+US6AjwQ4cIhxUf9+IoDAhy1w4Hiwli00uL4dOkbRYrscv6Ct0pferokGU/ P3a0ZPV84PzTsm0dPr+CRxCmGIiIqeUr+iz12Stc= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A0760F800F8; Tue, 18 Apr 2023 08:02:19 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2105FF80155; Tue, 18 Apr 2023 08:01:35 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (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 86853F800F8 for ; Tue, 18 Apr 2023 08:01:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 86853F800F8 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=wdtO+nc7; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=cvMCxB9m 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-out2.suse.de (Postfix) with ESMTPS id D72091F8D5; Tue, 18 Apr 2023 06:01:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681797688; 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=/lUtDdJ01nMGQCwdGQ6PYIWa8AuFDgIFbopJCtOcG2E=; b=wdtO+nc7PpwoiQwbiN//ftSTk/xLX3rqG280rhTXsFwU9jR/bDEEIuuA1W5G0T/wcFDVWH yDGA5zVQGRf19TFvCdDGssH8A8SML3o/nV/VEajfKZ8jW7L0wxwrhDBmpf9fe1mda44arm voUjBHvRxJSamehKkA9CLeoSRXtmVzc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681797688; 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=/lUtDdJ01nMGQCwdGQ6PYIWa8AuFDgIFbopJCtOcG2E=; b=cvMCxB9mQI4MVakfP8zOZmK9TRhg9y4R9ppB+6EMzN2DZ3+1187pVN/A57y2v/YqYTQ2k9 Tmvu90jpbNYJznAw== 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 A903B139CC; Tue, 18 Apr 2023 06:01:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id llkTKDgyPmRgNgAAMHmgww (envelope-from ); Tue, 18 Apr 2023 06:01:28 +0000 Date: Tue, 18 Apr 2023 08:01:28 +0200 Message-ID: <877cu9685j.wl-tiwai@suse.de> From: Takashi Iwai To: Christophe JAILLET Subject: Re: [PATCH] ALSA: hda/hdmi: Remove some dead code In-Reply-To: <91a31341f32d493bcc6c4515178ce0755ac1aa70.1681710069.git.christophe.jaillet@wanadoo.fr> References: <91a31341f32d493bcc6c4515178ce0755ac1aa70.1681710069.git.christophe.jaillet@wanadoo.fr> 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: 3ATFHB35FKC4MLNSP3GKMMWIVMIEEGMJ X-Message-ID-Hash: 3ATFHB35FKC4MLNSP3GKMMWIVMIEEGMJ 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: Takashi Iwai , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, 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 Mon, 17 Apr 2023 07:41:48 +0200, Christophe JAILLET wrote: > > These snd_BUG_ON() can never trigger, so just remove them to save a few > LoC. > > Signed-off-by: Christophe JAILLET > --- > This patch is speculative. Maybe the other "if"s should be removed and the > error code returned instead. > > I chose to remove these ones and the corresponding error code, because it > seems that it is already handled this way in hdmi_pcm_open(). > > I don't know the code enough, so it is only my guess. > > Review with care :) A sanity check is merely a sanity check, and we haven't got report hitting this, so this should be fine. Let's cross fingers. thanks, Takashi