From patchwork Thu Jun 9 08:31:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tinghan Shen X-Patchwork-Id: 12875023 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 4B03EC433EF for ; Thu, 9 Jun 2022 08:45:55 +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:References:In-Reply-To: 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: List-Owner; bh=ppcHHOxjd4mONTz9efPh0Jb94SVKqtcjVE76MviJ1iI=; b=xTaZUibCVYlpHv 2P0bjQ4GjvawRJMgnVOwm4j5nOo5uVjXveUcpb2aDYyIkhJjXBCCaQ0i1RUHTOtRXS3h9grYXEOPt o0Rk5EyHPT40OmNsEyWox8NtxJkm3/GcOn9bVZ7oFMZhFwS315JYVYp+C2RLjZVEj/1Po8rg+D3QY XO7yOEns27hYWj3YSKESyQ0OhtfGUl1PtNvdR7D9FOmI6oubKoJggPd+V2FTR/J3masBVHme2pJH5 NLtt/P9Ej1eHXrpxtFggasaxiC5xWqnxFzUIGcWWmERetWjFNY9yHzXRQufs9QdYq/2gvaAUjN+Op KVcBJv6jq6KBbtYndS1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzDmV-000Lo8-82; Thu, 09 Jun 2022 08:44:44 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzDZU-000FoV-Q4; Thu, 09 Jun 2022 08:31:18 +0000 X-UUID: 8e7f2b99448a4f86930497cc9a141737-20220609 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.5,REQID:44f22f58-980d-46ab-a479-17127b79879b,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACT ION:release,TS:-5 X-CID-META: VersionHash:2a19b09,CLOUDID:cdd43be5-2ba2-4dc1-b6c5-11feb6c769e0,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil ,QS:0,BEC:nil X-UUID: 8e7f2b99448a4f86930497cc9a141737-20220609 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1590645542; Thu, 09 Jun 2022 01:31:08 -0700 Received: from mtkmbs10n2.mediatek.inc (172.21.101.183) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 9 Jun 2022 01:31:07 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Thu, 9 Jun 2022 16:31:05 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.3 via Frontend Transport; Thu, 9 Jun 2022 16:31:05 +0800 From: Tinghan Shen To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Tinghan Shen , "Mark Brown" , YC Hung , Curtis Malainey , Allen-KH Cheng CC: , , , , Subject: [PATCH v2 2/3] firmware: mediatek: Use meaningful names for mbox Date: Thu, 9 Jun 2022 16:31:00 +0800 Message-ID: <20220609083101.24195-3-tinghan.shen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220609083101.24195-1-tinghan.shen@mediatek.com> References: <20220609083101.24195-1-tinghan.shen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220609_013116_903708_29563893 X-CRM114-Status: GOOD ( 12.49 ) 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 Rename mbox according to action instead of 'mbox0' and 'mbox1' Signed-off-by: Tinghan Shen --- drivers/firmware/mtk-adsp-ipc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/mtk-adsp-ipc.c b/drivers/firmware/mtk-adsp-ipc.c index cb255a99170c..3de94765d659 100644 --- a/drivers/firmware/mtk-adsp-ipc.c +++ b/drivers/firmware/mtk-adsp-ipc.c @@ -83,7 +83,11 @@ static int mtk_adsp_ipc_probe(struct platform_device *pdev) return -ENOMEM; for (i = 0; i < MTK_ADSP_MBOX_NUM; i++) { - chan_name = kasprintf(GFP_KERNEL, "mbox%d", i); + if (i < MTK_ADSP_MBOX_NUM / 2) + chan_name = kasprintf(GFP_KERNEL, "rep"); + else + chan_name = kasprintf(GFP_KERNEL, "req"); + if (!chan_name) { ret = -ENOMEM; goto out;