From patchwork Wed Sep 18 10:06:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13806758 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 87F0ECCD194 for ; Wed, 18 Sep 2024 10:09:00 +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=W3j703kzb7yk6L2QOMY/pzx/c85iMi3EJ9PiCmrcG7E=; b=vBlfGXLpEEp/drgNRp52F2hSzY RqZi6RpIuo1DQJdFdjbIGxkSUjxziwlkz5uhOn5ON38tH6Xjmpgq+d36joBTBc4c5gGo61b3c5kOI Vt4ejYoZRXl/DjmwA3bifAm6eoJgFL1jJhiuNY0VwJ/WYidFDX1t2T9Z8cGIinHMVA5OdWjbl07J8 oy/HwwhIIceSYPk8lBBcY9dRUze9gXOhU7XO84bjkJszMOzp6Xlofvorb7tN1E3No0/lcIO/a6jyX aSWxH7YuhfBSqFq45UxbIZhzSsrRDrE6+7R9+lfe2a2cR4cDK4cPbPAGte0ZE0LmjX+XddEWYHq4K F+0c0GTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sqrc9-00000007zYF-47wf; Wed, 18 Sep 2024 10:08:49 +0000 Received: from bali.collaboradmins.com ([148.251.105.195]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sqrZz-00000007z8S-2hBY; Wed, 18 Sep 2024 10:06:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1726653992; bh=ks/I8Rft33hUuiHWwdweAz1/NAcXILGYy4txuTbhcBw=; h=From:To:Cc:Subject:Date:From; b=WPPeRgyHQ5qEqoiD9QZHz4FyvmYBM98QY9ys4ZWshHtJMJeatPcokKbtjC8kF9P/G Z9iTOQsR9C0PcDEkPrl5hRWljwjR8icYagEVqTTf7Vh3j2fNBcslIZJJF4JcMEJPRe xW8rTo7496RGtJ7J0xzmx6wR7Joc25VuwVjiqwNR0JlxzJ+kcBKzLBlZttGthPRoT4 ppY+NzUajxGqD4EI3fs68XY4tCUsgtDaqyHsZt/JY2VjK32TgPsG6hHnK5RKffYyQ7 VjcJNFMQL5RapLiBf1/ZDto2VpuQ1/1BkyEF7+5uWNoPFscVPn/azWgYY0Rr+UXtQJ cnl87owaem+zw== Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (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) (Authenticated sender: kholk11) by bali.collaboradmins.com (Postfix) with ESMTPSA id 482B517E1097; Wed, 18 Sep 2024 12:06:32 +0200 (CEST) From: AngeloGioacchino Del Regno To: linux-mediatek@lists.infradead.org Cc: matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH v1 0/3] soc: mediatek: mtk-cmdq-helper: Various cleanups Date: Wed, 18 Sep 2024 12:06:17 +0200 Message-ID: <20240918100620.103536-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240918_030635_866264_AE40F5B9 X-CRM114-Status: UNSURE ( 6.75 ) 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 performs various cleanups to the MediaTek CMDQ Helper lib, reducing code duplication and enhancing human readability. This also avoids double initialization struct cmdq_instruction as, in some cases, it was stack-initialized to zero and then overwritten completely anyway a bit later. I'd expect compilers to be somehow smart about that, but still, while at it ... why not :-) Tested on MT8192 Asurada, MT8195 Tomato Chromebooks. AngeloGioacchino Del Regno (3): soc: mediatek: mtk-cmdq: Move mask build and append to function soc: mediatek: mtk-cmdq: Mark very unlikely branches as such soc: mediatek: mtk-cmdq: Move cmdq_instruction init to declaration drivers/soc/mediatek/mtk-cmdq-helper.c | 241 ++++++++++++------------- 1 file changed, 112 insertions(+), 129 deletions(-)