Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4564684ybv; Mon, 17 Feb 2020 01:29:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzrdEJsj2wHHAHTI+J+j+32zWPYWsJzUe+Sg4VmTpmATsHb1Rc97fB38b7o084PK4k0zSFX X-Received: by 2002:a9d:7617:: with SMTP id k23mr10786833otl.329.1581931795539; Mon, 17 Feb 2020 01:29:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581931795; cv=none; d=google.com; s=arc-20160816; b=vj/CDno5m0oVzOLwgl/USJgKVrhVRWkbMUT/ABXrzLeBdz+P56U3qr9Ggpc2ztNMJ5 R9Doyrb3d+g8b831yoe53jMjrv69GGD2SoaEex5IxXwVmAWdGwumfPqRefpRy4DxBU0X 37XGmJI2S8BlmH04M5eawuoeS4QU36xYwJfMEY7htYsgZnl7Z36ui9iV4ram3Se3UQ/7 N1X6OyC3sAcCvvMu/35jWCTVrX8XUDH+q/fWMyxz8wj3a2KLYl7OdnbA6s3wlyEcgLEC eETQRiksYQqkLkI80R6UvDFYD7zIitAz0yRW2rGkbDrfI5neywiHC7OdOk7KMjkrqPPD q80Q== 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=+AZRRBU+eXyDNfzUrhQQGTkVM4JM0kpcUBh6dZge9tA=; b=LwpR1uukKDtuf2+O7wPQPXqfOWT6qOfQm105HDgCH198GhurOGWxTj8kppEA7eeJIW ZOOlNjU3q+zizOw3Gp1lWOfYBvno3yZZj60Bn2MEP+a6ExzgdffF08GkbDqx4N3DNv/I ikC+5Zot3VREaoLKMV0sOUh/ZKkXJOitN509+6fbQy/jr56IS9UauLWFiR7g2eHjEgJc 9p++zC44Vk6m0qnbM4oarfQ1WCunXt7ovMv5eLboTPtgw5zLnzCkp2Bi+qJMQ3xBt1nc odPN3MRoz+e4ST0GuRcPaIRdUJsHOM7aTcXKtnVHIdFICC0Io5KLD54H6CwkkDB0UNfC XbAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=RDCvw7tH; 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 t7si6676819otl.133.2020.02.17.01.29.43; Mon, 17 Feb 2020 01:29:55 -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=RDCvw7tH; 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 S1728859AbgBQJ3g (ORCPT + 99 others); Mon, 17 Feb 2020 04:29:36 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:32672 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728773AbgBQJ3g (ORCPT ); Mon, 17 Feb 2020 04:29:36 -0500 X-UUID: 62babae891504fdc96b7d46612dea2b6-20200217 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=+AZRRBU+eXyDNfzUrhQQGTkVM4JM0kpcUBh6dZge9tA=; b=RDCvw7tHLfWuqmOGS911L2SXvA9CN9I/QCntQmRrc4VGTjml9DqeQNDiCsMEJAgxO6Vvx9S5J2s8E+8K9iyuOX1LGmyMMP2AiYWwwYl6TeCK8S8zaroegAj8Kw9dj98NG2G/V3WVJ1EIxW9QOrigMu7cTCRUinOPcnsCF7Bter0=; X-UUID: 62babae891504fdc96b7d46612dea2b6-20200217 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1424113595; Mon, 17 Feb 2020 17:29:32 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 17 Feb 2020 17:28:46 +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; Mon, 17 Feb 2020 17:27:27 +0800 Message-ID: <1581931765.12547.0.camel@mtksdaap41> Subject: Re: [PATCH v1 2/3] mailbox: mediatek: implement flush function From: CK Hu To: Bibby Hsieh CC: Jassi Brar , Matthias Brugger , Rob Herring , , , , , , Nicolas Boichat , Dennis-YC Hsieh , Houlong Wei Date: Mon, 17 Feb 2020 17:29:25 +0800 In-Reply-To: <20200217090532.16019-3-bibby.hsieh@mediatek.com> References: <20200217090532.16019-1-bibby.hsieh@mediatek.com> <20200217090532.16019-3-bibby.hsieh@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 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 SGksIEJpYmJ5Og0KDQpPbiBNb24sIDIwMjAtMDItMTcgYXQgMTc6MDUgKzA4MDAsIEJpYmJ5IEhz aWVoIHdyb3RlOg0KPiBGb3IgY2xpZW50IGRyaXZlciB3aGljaCB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