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 54939C77B75 for ; Tue, 18 Apr 2023 06:01:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230045AbjDRGBf (ORCPT ); Tue, 18 Apr 2023 02:01:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229714AbjDRGBb (ORCPT ); Tue, 18 Apr 2023 02:01:31 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 464A02125; Mon, 17 Apr 2023 23:01:30 -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-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 Cc: Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, alsa-devel@alsa-project.org 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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