From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50A0217CA12; Mon, 10 Mar 2025 17:48:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741628919; cv=none; b=NXVL6psaLrvLItC9f+qG2InUe5QZj5XFZgj7GgCnHJIPCt64Kl1P7O8865qcKIcAX/41Tk530Bf2dfV8imnCRL7YpJAVVDORBOhyBu1hn7nDnp3fQnuyTAqCGe/Vx3cTiJN4OwvBnksB/61EsUMpBZEP/scSzogsP/VAJeRdbXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741628919; c=relaxed/simple; bh=5Oolg+p3dvTPxeDf0zwL290izu+JvEnjPVKmsbmrpWo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cNmQcKeEXRxO3zLH0OEO0m9FbdJO3sU/T0/Oo9PlJ49bUI/ZxYIeUvBg3R6vnyQD/tJAlz9NykHu+A/uux4dbCS28JxI9XnY5XzMUFDIcTs0Q/QpDbl7LOLLq/KVxzjiwQCIgcd5MkNuffXJCSKAaxriFsaCIjjsQXVJdTazz8k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=E05W3KqC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="E05W3KqC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB4FDC4CEE5; Mon, 10 Mar 2025 17:48:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741628919; bh=5Oolg+p3dvTPxeDf0zwL290izu+JvEnjPVKmsbmrpWo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E05W3KqCGVs2qnO5H0HoMqC/K8F2L/FZrglhf5p0HwsAKVg+9pEFhpKiw/Escw0UP JJbaJRtTKgrIMkWl6Ffmwgqyk971d5eRFH0zM+Sabz708HpJv3zvRoUD9EtgcrXTAC xNslDH59OWu+Ny9w1nbldJ47ZKHddNA0Hx3IVwiA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Claudiu Beznea , Geert Uytterhoeven , Mark Brown , Sasha Levin Subject: [PATCH 5.15 083/620] ASoC: renesas: rz-ssi: Use only the proper amount of dividers Date: Mon, 10 Mar 2025 17:58:49 +0100 Message-ID: <20250310170548.861098044@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250310170545.553361750@linuxfoundation.org> References: <20250310170545.553361750@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Claudiu Beznea [ Upstream commit 55c209cd4318c701e6e88e0b2512a0f12dd02a7d ] There is no need to populate the ckdv[] with invalid dividers as that part will not be indexed anyway. The ssi->audio_mck/bclk_rate should always be >= 0. While at it, change the ckdv type as u8, as the divider 128 was previously using the s8 sign bit. Signed-off-by: Claudiu Beznea Fixes: 03e786bd43410fa9 ("ASoC: sh: Add RZ/G2L SSIF-2 driver") Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20241210170953.2936724-6-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sh/rz-ssi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/sh/rz-ssi.c b/sound/soc/sh/rz-ssi.c index 2e33a1fa0a6f4..9ef7d0a12d985 100644 --- a/sound/soc/sh/rz-ssi.c +++ b/sound/soc/sh/rz-ssi.c @@ -243,8 +243,7 @@ static void rz_ssi_stream_quit(struct rz_ssi_priv *ssi, static int rz_ssi_clk_setup(struct rz_ssi_priv *ssi, unsigned int rate, unsigned int channels) { - static s8 ckdv[16] = { 1, 2, 4, 8, 16, 32, 64, 128, - 6, 12, 24, 48, 96, -1, -1, -1 }; + static u8 ckdv[] = { 1, 2, 4, 8, 16, 32, 64, 128, 6, 12, 24, 48, 96 }; unsigned int channel_bits = 32; /* System Word Length */ unsigned long bclk_rate = rate * channels * channel_bits; unsigned int div; -- 2.39.5