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 CA9F1C6FD18 for ; Sat, 22 Apr 2023 07:53:39 +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 7C1E8EA4; Sat, 22 Apr 2023 09:52:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7C1E8EA4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1682150017; bh=9PcGFVMsi4gQ/aUASK6RUbw0Yjqdd8EoXkuZL8m/jc8=; 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=SPbx5w4sAqb9NB16UVI75ihLCkAMVE/koPp0g7aha+SoWBkijkgcCg0Uym7ZTrGXc 0GZLp1u+sLq/3F9JkKLvBvrleNqh/Hwk8zasFvQK9/iSnsV+k22/Cv+Up4A+lQ1QXL sAGL8hY5pk6prZJWAbTOsgpEemZHTZiq8rGpJhag= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 02295F80053; Sat, 22 Apr 2023 09:52:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 69C9FF80155; Sat, 22 Apr 2023 09:51:42 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (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 94F64F80053 for ; Sat, 22 Apr 2023 09:51:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 94F64F80053 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=nBInlqDi; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=ge9vYfUa 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 CC4751FDEE; Sat, 22 Apr 2023 07:51:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1682149898; 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=48EiVb7iGL91pyiL4wV7zlSALlgot8y9AP8bXjSy7w0=; b=nBInlqDiuDvmlYMUgQWw7btqSjiAEwOtKxAMGaT+PT3fI3Jgkqe8qC9yOh+bu0RGwr0qxk ejNxL1gtV5ErbLxH1S8UwHLu7ByuKJCrr8UDZgRnEVeW0lq/x5NxXDia+VncoF42zE4UhW 6ixgSnXedLANQWk6RYBi7QXGj7wghCA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1682149898; 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=48EiVb7iGL91pyiL4wV7zlSALlgot8y9AP8bXjSy7w0=; b=ge9vYfUacrVFY+mR4Lf+P3YrD6ErWfyp91Z54b5P9cbqyo4VcJfXQCAqYXlQ3Peo5yNzJz xrLbJLwOQtr95oDQ== 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 AC19013499; Sat, 22 Apr 2023 07:51:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id GkgQKQqSQ2ToJgAAMHmgww (envelope-from ); Sat, 22 Apr 2023 07:51:38 +0000 Date: Sat, 22 Apr 2023 09:51:38 +0200 Message-ID: <87wn24pd6d.wl-tiwai@suse.de> From: Takashi Iwai To: Oswald Buddenhagen Subject: Re: [PATCH] ALSA: emu10k1: minor optimizations In-Reply-To: <20230421172623.1017207-1-oswald.buddenhagen@gmx.de> References: <20230421172623.1017207-1-oswald.buddenhagen@gmx.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: QXZUZ22H3T2FR2RR3FFFCPFU75ZYMLNG X-Message-ID-Hash: QXZUZ22H3T2FR2RR3FFFCPFU75ZYMLNG 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 Fri, 21 Apr 2023 19:26:23 +0200, Oswald Buddenhagen wrote: > @@ -1245,12 +1245,10 @@ static int _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu) > icode->code = icode->tram_addr_map + 256; > > /* clear free GPRs */ > - for (i = 0; i < 512; i++) > - set_bit(i, icode->gpr_valid); > + memset(icode->gpr_valid, 0xff, sizeof(icode->gpr_valid)); > > /* clear TRAM data & address lines */ > - for (i = 0; i < 256; i++) > - set_bit(i, icode->tram_valid); > + memset(icode->tram_valid, 0xff, sizeof(icode->tram_valid)); While those are OK... > strcpy(icode->name, "Audigy DSP code for ALSA"); > ptr = 0; > @@ -1886,12 +1884,10 @@ static int _snd_emu10k1_init_efx(struct snd_emu10k1 *emu) > icode->code = icode->tram_addr_map + 160; > > /* clear free GPRs */ > - for (i = 0; i < 256; i++) > - set_bit(i, icode->gpr_valid); > + memset(icode->gpr_valid, 0xff, sizeof(icode->gpr_valid)); > > /* clear TRAM data & address lines */ > - for (i = 0; i < 160; i++) > - set_bit(i, icode->tram_valid); > + memset(icode->tram_valid, 0xff, sizeof(icode->tram_valid)); ... those bitmap sizes don't match with the previous numbers, so this is a behavior change. thanks, Takashi