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 6EA67C77B61 for ; Tue, 25 Apr 2023 08:17:48 +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 813781064; Tue, 25 Apr 2023 10:16:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 813781064 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1682410665; bh=OdDLDsocRTsw0L4klZGuEQcWnlz1UiTYPi1wPRtbfUA=; 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=EopHH+kygwYQJMBmzXG4utjdoLw5dU44lhFliAH0cY//qfVOAXNpIY5q/l610KywT bvsiFtKfeD1ytCZ6mMmF5mnBBOPu2WfQHbCBtoyZQ6/8U7hJf+jELs0+RvTM08VOEU QPyllj+CoGulCn/tIfcosj6zcqKkiEyXNnNFRN5g= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 15644F80236; Tue, 25 Apr 2023 10:16:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9F44DF80236; Tue, 25 Apr 2023 10:15:41 +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 0D083F800F8 for ; Tue, 25 Apr 2023 10:15:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0D083F800F8 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=VPxLSLiI; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=2uc9XdQI 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 A271E218FD; Tue, 25 Apr 2023 08:15:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1682410537; 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=1y98WB6Lgibxi0ZkNAcCIpu1zmdktSiUV5oHvZGLBZA=; b=VPxLSLiIxgvFNA6aUOxDfGjiz40SPl+9OxMlLwcKDwTq0XojIkWjvDYdoMtHbUy0cuG9jX xo2AxnzeLL+Nl2T1dh90quyP0NOOoIBEnvMGZt7uZUiGlwiT8kqtfsj2HWFzuVZ3LwClB8 2iV+DtHrzJScb+mgMKpLqAw4LQV3VZ0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1682410537; 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=1y98WB6Lgibxi0ZkNAcCIpu1zmdktSiUV5oHvZGLBZA=; b=2uc9XdQICIfAtz7C2TXdQKe8hLgvVfQG1WYPbr2mH2YJ7Ry9hXrHbsp+Qn2TIb7+02bade HZXa7NWHC0sNsuDg== 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 81760138E3; Tue, 25 Apr 2023 08:15:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id nI+qHimMR2SxVgAAMHmgww (envelope-from ); Tue, 25 Apr 2023 08:15:37 +0000 Date: Tue, 25 Apr 2023 10:15:36 +0200 Message-ID: <87ildkv0lz.wl-tiwai@suse.de> From: Takashi Iwai To: Oswald Buddenhagen Subject: Re: [PATCH] ALSA: emu10k1: fix multi-channel playback device class In-Reply-To: References: <20230422161021.1143989-1-oswald.buddenhagen@gmx.de> <874jp7oy2k.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: B6HTN5MVC4N4NTAR4U6LHCP7RLHF42D4 X-Message-ID-Hash: B6HTN5MVC4N4NTAR4U6LHCP7RLHF42D4 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 Tue, 25 Apr 2023 10:00:45 +0200, Oswald Buddenhagen wrote: > > On Mon, Apr 24, 2023 at 12:32:58PM +0200, Oswald Buddenhagen wrote: > > so i'd postulate that these enums are effectively dead, and both the > > risk and the gain of this change are about zero. > > speaking of dead code, lots of drivers explicitly assign info_flags = > 0, dev_class = SNDRV_PCM_CLASS_GENERIC, and dev_subclass = > SNDRV_PCM_SUBCLASS_GENERIC_MIX, which are all technically pointless, > as the pcm struct is kzalloc'd anyway. and of course it's entirely > inconsistent (with just about every combination present), because it > obviously works without this. how would you feel about a patch that > just removes all these? The dev_class and info_flags initializations to zero aren't entirely pointless, IMO. It explicitly shows that the default value is used. OTOH, dev_sub_class is always 0 for the existing drivers, hence dropping the explicit initialization would be an acceptable cleanup. thanks, Takashi