Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4950021rwe; Mon, 17 Apr 2023 23:01:55 -0700 (PDT) X-Google-Smtp-Source: AKy350ZXyxtu/nuBldXvLyGxFOtNDk1HRKdMfJUDdlgyukxRePj49m4LMdeqPjbXqp50YYtSd3J2 X-Received: by 2002:a05:6a20:12c6:b0:ef:f558:b76 with SMTP id v6-20020a056a2012c600b000eff5580b76mr5950031pzg.5.1681797715265; Mon, 17 Apr 2023 23:01:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681797715; cv=none; d=google.com; s=arc-20160816; b=eu2+syykIudfae2fucQB+z8UWY7Qe52FOQW8B6K9WcHaH0N4rwg2AXMdXnpre06+Z1 xadCruUcWp392mdG/8I3cxFvl5hbAXcV6GSqQev6x1Z0CuHqBnosCfe8RHigfB8pFRQE aLXLlNeK645wrOddNIX4ywsuL7Od3vMmp8GjeqFX27HyesWWS5h2tKvNb+tKBrBAx73n bjOM9VL3HmzQ4WQHGejOvNicuh3XIfZCBjerz+/1bSrD6wl4Py43uFzj5HB0p7sybQJr aJMel11075J16rgB83fR5PJTmUiks3X+daAjitlsvbQ+O8Gpw0egD68JqEqtGbH0qDvx EkDw== 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=/lUtDdJ01nMGQCwdGQ6PYIWa8AuFDgIFbopJCtOcG2E=; b=bJN6ZQ/OK5Udn7fhG6VUvzr3nDXSD8IWC1cYKwvP3RCXXZtZuAjjYPNH5AAWfztAcA EQxbS6vY4xHxsFRRGWnwfxOmXF0kuHEr7elB2tkBWU5GuXKJZ+K2bMNKBX/a2/js59Mo RluQ2/bKmYkcC+4++hdmZ+a39CDnBGW48jP9Pesemphn2Yp8dIJF4cj78jpqxoV8ogNH QzrdJHTIk3rSxE14tOt6xvsWQVIlMCbuNTcNSaVWlbbR90WQeGsE6+Zf1c/Pr3WIPcfH V5zJrLu5O5+6ElNVOTSIv98moaw2ZolkaxrssRdxlM0unZBaOqyl8Fsrj/Yn8VplPixH 1vGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=wdtO+nc7; dkim=neutral (no key) header.i=@suse.de; 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 x3-20020aa79a43000000b0063b1bfa94dasi8605426pfj.323.2023.04.17.23.01.40; Mon, 17 Apr 2023 23:01:55 -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=wdtO+nc7; dkim=neutral (no key) header.i=@suse.de; 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 S229958AbjDRGBc (ORCPT + 99 others); Tue, 18 Apr 2023 02:01:32 -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 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 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