From patchwork Fri Feb 18 00:09:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 12750785 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 86423C433EF for ; Fri, 18 Feb 2022 00:11:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=LGXQ1+Yg0jO6GmOC2jALqXbahkyXlm0x17RDUmNjDVc=; b=XRejCzu+D3+rPp /Vj9cN+4MMFYQFE2DwiNSHxbg5sTS5f47onplXqCDUljAxp0aRCQudcjgArdaPYZgX4f7BJqlVxV8 i2Ln7p5mGDUxTeDbgAYi0wXj+XE+ujeaGQZXEAvvdeN8EAk2R/cNRIDGwjT2Z7W5q9OlI+k93rWbl J+236iAIT59RROxTuVDC7or95/ftCdMFJt3bWFE/KO6f2wiS0fZ3+Y43xO3cqkzxOpsLSTQ2c5/wR waES2OlFz4b9HAURRwS2jjYPOdftGKVmOVCFlSqWxX56r+8k/AsqGApwp+oU3ycdRQV4m6s83npuE sSqxj2BaW+OenF8Pt6Pg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKqqS-00CXeT-V3; Fri, 18 Feb 2022 00:09:57 +0000 Received: from mout.gmx.net ([212.227.15.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKqqE-00CXZY-Ce for linux-arm-kernel@lists.infradead.org; Fri, 18 Feb 2022 00:09:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1645142966; bh=IUY/Y8Yalj5BX0e49AhUG8NejOzNrCeKKECRLd/cfB0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=g9t0/AtHqGQeNCOHRCB1iLtdV7W+jIgwKvpWXnn4VAaGn53Q+XnyM8NF/GrRhngfz w7vnf9MOomInAvIRDPmNPydwle2NUN8I99hh5sOit2QJt4qIwgTfA3lVaIRE4rlrQS 51uOVIiozDxeN4+lgawL/RH7PuOwZ5EKPmTO3PUg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([5.146.194.160]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MtOGa-1o7bPE27uo-00uo9K; Fri, 18 Feb 2022 01:09:26 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-clk@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Jonath?= =?utf-8?q?an_Neusch=C3=A4fer?= Subject: [PATCH v4 0/5] clk drivers: Terminate clk_div_table with sentinel element Date: Fri, 18 Feb 2022 01:09:16 +0100 Message-Id: <20220218000922.134857-1-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:SwIrvdnd0sbyaueb09YuSqV9exkrua/1OLLW1xmo5FZXWsJlJ4C 0z1YzQNkcy/0Mnt1W7+xQVgNWsCI6G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VXpvZEZzKlXLkJX6QCyrZEXIyrG4bMkkard/j37lzm6k2ayvWDyHP8yeFPu0XF+1ZIG9I41 QQv9TBYojHETIF68kGBtTWNxMVj6peSdaXjO5rX5h8M57MauxgYUx5UmiifGt7kkR31RMNIpY QdKSuYIdqEfpAWkWka1LYNRRx/JwVhQELIXo0gnko4sfSNHW83yBhv+rhVEKCBB8kaiAJitwT pIwLWpUygqmi78= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220217_160942_769953_7431C635 X-CRM114-Status: GOOD ( 12.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org I noticed that some of the clk_div_tables in different drivers are not terminated with a sentinel element. This may cause the code in clk-divider.c to read garbage that happens to be beyond the end. This patchset fixed all instances of this bug that I could find, except for a case in drivers/phy/ti/phy-j721e-wiz.c that is already fixed in linux-next: https://lore.kernel.org/lkml/20220117110108.4117-1-kishon@ti.com/ In this version of the patchset, I addressed Philippe Mathieu-Daudé's style comments. As far as I found it reasonable, I simply updated the existing patches, but in the case of the Actions Semiconductor drivers, I made a bigger cleanup in a separate patch. v4: - Various style fixes v3: - Change the Actions patch according to Mani's comment v2: - Add Fixes tags Jonathan Neuschäfer (5): clk: actions: Terminate clk_div_table with sentinel element clk: loongson1: Terminate clk_div_table with sentinel element clk: hisilicon: Terminate clk_div_table with sentinel element clk: clps711x: Terminate clk_div_table with sentinel element clk: actions: Make sentinel elements more obvious drivers/clk/actions/owl-s500.c | 16 ++++++++-------- drivers/clk/actions/owl-s700.c | 17 ++++++++++------- drivers/clk/actions/owl-s900.c | 26 +++++++++++++------------- drivers/clk/clk-clps711x.c | 2 ++ drivers/clk/hisilicon/clk-hi3559a.c | 4 ++-- drivers/clk/loongson1/clk-loongson1c.c | 1 + 6 files changed, 36 insertions(+), 30 deletions(-) --- 2.34.1