From patchwork Sun Jul 7 05:47:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13725964 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 49539C30653 for ; Sun, 7 Jul 2024 05:48:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=8pSTgdZnyG0WLlJB7fRFIXGVRIVCBFFXYFkuJxWni6Y=; b=R344HChfCfmCLh1O9MlAMVzP6p PRZdyO0i3EsxV5YqQKRUbR5RZPrM8/nERPi5G0owPHOJUdPxqN/U3ReF4CRNtj1mvCnHyq0Fz/jx2 onhzHRMkkbQcGSGsrg2jrDsKWGKG1y0aE4kpdlFHjG/uVvrz3LRcUCHbA3nRg7OP5/QRrLKrJ7uvs /9pfa8aiv1maMKS8qCIwgXxgPZRkbTLMF1sXePRSrhBQKnobv0JaqnrKOy5fLJK0B13kBqZlRKH8i DNqTZZOuxg7MzDl/Oh3bEsXjoB1SOKuBDsRsjHm68q5P0jiPMSkZqcQhtYYmryn8N3zYEJzFCgKoy 6Hy6zdow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQKkb-00000001NaS-2vJ4; Sun, 07 Jul 2024 05:47:53 +0000 Received: from smtp-65.smtpout.orange.fr ([80.12.242.65] helo=msa.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQKkM-00000001NXi-3zr1 for linux-arm-kernel@lists.infradead.org; Sun, 07 Jul 2024 05:47:40 +0000 Received: from fedora.home ([86.243.222.230]) by smtp.orange.fr with ESMTPA id QKkEsyOxChEtDQKkEs8JGj; Sun, 07 Jul 2024 07:47:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1720331253; bh=8pSTgdZnyG0WLlJB7fRFIXGVRIVCBFFXYFkuJxWni6Y=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=lIOVhAW+drTQMVfkDzgXljERlaxfwUOHWEUbsUAQdlUAg4+Ox8JCoD6OD6WNqHu9v F1k0nngx4C99rcgu3tGXM4m7qLPFua7HGlCqCfNBTkF+euLbbtuCl9t6IFlT/qrJo3 b7pUGDfSn8rrhadTEwd6umJlYgJupUXhrukZ1NuvKpLyRkvMwxdGFc5c9N/Fi5BRxi 44cFKv7OZGUs3Z3qfvnIcf2pGdbmOai/4FJ9m8LNw1PQwcbz4TLKqKq6AosD8ruEwO 3erHBv4gG/2l3A7518DvuS9TCnnJIj1//yon6mFbRlXJe8YlXaNir/OSR6vnu4Wx6z Kvot4pAGhQ5zQ== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 07 Jul 2024 07:47:33 +0200 X-ME-IP: 86.243.222.230 From: Christophe JAILLET To: matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, fchiby@baylibre.com, fparent@baylibre.com, s.hauer@pengutronix.de Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v2 0/3] soc: mediatek: pwrap: Constify some data and other improvements Date: Sun, 7 Jul 2024 07:47:19 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240706_224739_150161_F5436158 X-CRM114-Status: UNSURE ( 8.05 ) X-CRM114-Notice: Please train this message. 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 This series is motivated by patch 1. The 2 other patches are some additionnal goodies spotted while looking at the code. Patch 1 constifies struct pmic_wrapper_type to move some data to a read-only section, in order to increase safety. Patch 2 does the same for some int arrays. This helps move about 7 ko of data to a read-only section. Not that bad! Patch 3 simplifies code related to clk management. It also fixes an issue if the driver is unloaded. Christophe JAILLET (3): soc: mediatek: pwrap: Constify struct pmic_wrapper_type soc: mediatek: pwrap: Constify some struct int[] soc: mediatek: pwrap: Use devm_clk_bulk_get_all_enable() drivers/soc/mediatek/mtk-pmic-wrap.c | 118 +++++++-------------------- 1 file changed, 30 insertions(+), 88 deletions(-)