Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6395863ybf; Thu, 5 Mar 2020 19:56:46 -0800 (PST) X-Google-Smtp-Source: ADFU+vvS88zGOI1miUmuZjAC1YMJeKGXFunXdujZUn8nJEDXEtOBYBZQy+duINvb7ppmsNc8no1h X-Received: by 2002:a9d:6446:: with SMTP id m6mr920314otl.122.1583467006105; Thu, 05 Mar 2020 19:56:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583467006; cv=none; d=google.com; s=arc-20160816; b=TiVhMX2C3hyKQ/qNvuliwqjSp6nlhAb6l7EFvCB+AdciI4Gd+G2VrRxGA5mHP9HWyH 7ydeerO/1Gon/3tWqgye5JTLe749IW2Snw4hMIH4fWr4Mefkuz0N7tU8IfrsrE385GgG l/+X/lLsDQCSeeXM2vFlhWIjMR5h+14UAo1RilC/gtBZVxxvQ7fLRgUwbWdIQSbyC//E 4J4uPXI6sbYRFycfQTZdTuTn+tK7wku7QN4ttF2hSt+WUlgG7zc0WOC9NTXNDqXIK6iw M+mfR7G6N49mQJZm16/uUKUOAuL+JaEDzdLXR7wpImuH9xcQLQzgcOkUbLoGiOHUUPzL 6/MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=HbvwGK3+J6EJNiSbZ0JadzfJDjJt686R95a2GVph8QM=; b=Iihhh933GG/EjB4yrozI73PsGZUT8BQL+4a6mWNY0QhhEb7wh9GqJ7r9yWRxF7x3m0 xMoG7QzpT678bM9qb51uL89O7g6JlGqqeS/DNzewTr/L/1DnQaUm4k84pXqWGHHkJiSe +/2BBU62HxdjwRemu80bu4h+nJ/FCfPX9bou5y58Ib7zDv/1cBu06qM53zUi7PD/15zY znLJI/VkXmtQbpaUPc8wQuEsTm5pItsxsdJHCzQX5Guck2SfJzH8kGoWXINJTlnRsixo r7h83Z1M+jF1d/Vbq0ymawbF28UP2ZNcx55SElG9aKYh5t7RaYMkNQaBKuM39M5nz1Mm 96GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Pt9qHsl3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n17si645853oij.142.2020.03.05.19.56.34; Thu, 05 Mar 2020 19:56:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Pt9qHsl3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726413AbgCFD4B (ORCPT + 99 others); Thu, 5 Mar 2020 22:56:01 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:15514 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726300AbgCFD4B (ORCPT ); Thu, 5 Mar 2020 22:56:01 -0500 X-UUID: 4dfc0d7054d4428a975660398e013419-20200306 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=HbvwGK3+J6EJNiSbZ0JadzfJDjJt686R95a2GVph8QM=; b=Pt9qHsl3RzuWTINl1JAmLkik/Uw15ZlDNd/4tPte5SF/FCpz7oxVFWPHDmqs3SrfbQTb8oNfu9wztXl2a28HYOIitRAOlA7PDy1spu1k29e381ORdupWegTfX7Hz0/5W6I3qoSoYPUjtsyRMYnrBPc82YZyUmvVGaN86GwU+9ms=; X-UUID: 4dfc0d7054d4428a975660398e013419-20200306 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1715054070; Fri, 06 Mar 2020 11:55:50 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 6 Mar 2020 11:54:29 +0800 Received: from [172.21.77.4] (172.21.77.4) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 6 Mar 2020 11:53:06 +0800 Message-ID: <1583466941.18586.1.camel@mtksdaap41> Subject: Re: [PATCH v1 2/3] mailbox: mediatek: implement flush function From: Bibby Hsieh To: Jassi Brar CC: CK Hu , Matthias Brugger , Rob Herring , , , , , , "Nicolas Boichat" , Dennis-YC Hsieh , Houlong Wei Date: Fri, 6 Mar 2020 11:55:41 +0800 In-Reply-To: <1581931765.12547.0.camel@mtksdaap41> References: <20200217090532.16019-1-bibby.hsieh@mediatek.com> <20200217090532.16019-3-bibby.hsieh@mediatek.com> <1581931765.12547.0.camel@mtksdaap41> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 269D5AFE256631CE763A7BA8ECC2A47A2B9957979F165F20397039FB87C414FF2000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGksIEphc3NpLA0KDQpodHRwczovL3BhdGNod29yay5rZXJuZWwub3JnL2NvdmV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