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 29EBFC636CD for ; Wed, 1 Feb 2023 12:24:09 +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 58381820; Wed, 1 Feb 2023 13:23:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 58381820 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1675254247; bh=7mCdQ1iozLn0rcg/87dFe8MryrX4X15b7S2VYCypRZg=; h=Date:From:To:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=Yo1WCxgda7HyPW55/moGl+c4n7i/03IRInT71kZ4g+8JsLLCs5abHrmmdmhCOYA0Q danR+02eGgAoe5NaUbrcr7/oOUBJf3dlfvomG2iHokbqbGpGphRVwxRX6RFHeAQBO9 gqgB9SLIpVHcXUglpwsh98FT0MUpIEAE/03C9ie8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D3ED1F8032B; Wed, 1 Feb 2023 13:23:16 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 81862F80423; Wed, 1 Feb 2023 13:23:15 +0100 (CET) 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 4C1CBF80169 for ; Wed, 1 Feb 2023 13:23:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4C1CBF80169 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=FERQPGtJ; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=DbG+f8DT 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 0A70620DFF; Wed, 1 Feb 2023 12:23:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1675254191; 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=ISPFAssdKTREKF1mv5BU3ewT5bNGU7OV/5fRIf6LT4Q=; b=FERQPGtJ1J4T/mOGkm82NrELUH92uLOFT4GYNrH0QjW6sxcf2xRSOwi5wHaWrKrePRl7Co ZJGR5xlq8vvKEJFzkcLKEWqcFFRnFNQahlB6mWSb/BUSbi7yz4z6cOmr39DfvWjdu5PB1W NZvszHZBuaIxa4yzM53YOuoM6QvzGGs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1675254191; 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=ISPFAssdKTREKF1mv5BU3ewT5bNGU7OV/5fRIf6LT4Q=; b=DbG+f8DTU3GBBcbA5RzOygPXnJP0gzrqTtGAtaraJ7/oy/o0sXGzAPU+4+E8QtDCgjC4j2 GQEehltngTSEgQAQ== 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 EAC6B1348C; Wed, 1 Feb 2023 12:23:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id MlHzOK5Z2mMNOQAAMHmgww (envelope-from ); Wed, 01 Feb 2023 12:23:10 +0000 Date: Wed, 01 Feb 2023 13:23:10 +0100 Message-ID: <878rhhy3pt.wl-tiwai@suse.de> From: Takashi Iwai To: Dan Carpenter Subject: Re: [PATCH v2] ALSA: pci: lx6464es: fix a debug loop In-Reply-To: References: 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-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Takashi Iwai Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Tue, 31 Jan 2023 11:02:13 +0100, Dan Carpenter wrote: > > This loop accidentally reuses the "i" iterator for both the inside and > the outside loop. The value of MAX_STREAM_BUFFER is 5. I believe that > chip->rmh.stat_len is in the 2-12 range. If the value of .stat_len is > 4 or more then it will loop exactly one time, but if it's less then it > is a forever loop. > > It looks like it was supposed to combined into one loop where > conditions are checked. > > Fixes: 8e6320064c33 ("ALSA: lx_core: Remove useless #if 0 .. #endif") > Signed-off-by: Dan Carpenter > --- > v2: In the first version I just deleted the outside loop but that was > not the correct fix. Combine the conditions instead. Thanks, applied. Takashi