Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp303581ybk; Fri, 15 May 2020 00:51:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/ea5zgPjn9LgHtHY5BEEIgWlvQPx/viO4r+lKfDpd+pEE5oGwQnIQ/5UhuP3BSZbJcNuH X-Received: by 2002:a50:ef09:: with SMTP id m9mr1545540eds.321.1589529091779; Fri, 15 May 2020 00:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589529091; cv=none; d=google.com; s=arc-20160816; b=kxyabo1YyMyteLQhzyeCl05VXznxg2/TBilmazjQX/ms+7x0yj7v5zrP7ZlF/8KxQ5 hedyuE5mcRrjltDrPC+AX866qmNE1Jg8dAcRvia2ikOOkJX01WuBJdCRNji8SJuMW2TO U9CJuxYFhnSXvmFUydr7DKCVMzGC/kdOpTxHKcjkwnJQiu6MVcQ+UXM2R5yTO4ev8jvg 479skEKVpt3pZQ/ksY5Px8gNnZ16eLEA59viT4jJFTStd4VeAUDR50woaWrN8j9ernB0 m51GS6KTbTgq4m/SJmj6CSElfDQn79mKJI1wrpn7kpSQKA4WAmlJkidNvQzhQuUepAWY 6gIw== 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=2U0lk+3AOLEFSBOQ1vgqYzwMDxMh7x/MPGzDHrIVnCI=; b=Z8wAtxsEGXs8g+fYtMiIKV51lzpCyaBPFlWywCNC8AxDmk7CLChe76MgdbbakA9KIy FSxIohDizzr6k+c1daEqkKHbCEvsxvZl8SNRFREKh717W0/r+mdz6YW/E3ju6xZuqHbS yv3bcJoSjN8VZKPC9KYKXesSmFmMPqbDgCSEEyxcDDtMxNvAHiyAtbgluM6xL15zI5OR CGwdv5ldSGy0zMrHv6K89cJTinMoRko5hnk6w0jvy0WhqlUY3I5IDCwn5hp/Knrpj7b1 VdT7Ukq2Ra3ddQwKOf6CkNEIwgCECooQazU+U96+erkB57foH53N9p95rdYI5aWBKFpP 5oYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="pTa7/TQK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id y19si662853edi.10.2020.05.15.00.51.08; Fri, 15 May 2020 00:51:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="pTa7/TQK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726696AbgEOHqq (ORCPT + 99 others); Fri, 15 May 2020 03:46:46 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:50105 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726622AbgEOHqp (ORCPT ); Fri, 15 May 2020 03:46:45 -0400 X-UUID: 31affafba9744c9bb4271d5cfe7b7585-20200515 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=2U0lk+3AOLEFSBOQ1vgqYzwMDxMh7x/MPGzDHrIVnCI=; b=pTa7/TQKo3fNfcgb64IZqrz3/hQVIAkKaZMUKjyUczzczsLzL+Q+sp3s3dc81LW4uvZCHbMU3QuWPXeI4dJADjaxYtu3Ott/a1PCCcT6dX3MVyVjROuZIy/9ACmbxUJK2HvAawLXKfVBV6KCLb4WkfJzB+P8GmxRJUHhKzWQEOI=; X-UUID: 31affafba9744c9bb4271d5cfe7b7585-20200515 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1939548208; Fri, 15 May 2020 15:46:36 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 15 May 2020 15:46:20 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 15 May 2020 15:46:18 +0800 Message-ID: <1589528699.26119.9.camel@mhfsdcap03> Subject: Re: [PATCH v2 23/33] iommu/mediatek-v1 Convert to probe/release_device() call-backs From: Yong Wu To: Joerg Roedel CC: Will Deacon , Robin Murphy , Marek Szyprowski , Matthias Brugger , , , Joerg Roedel , Date: Fri, 15 May 2020 15:44:59 +0800 In-Reply-To: <20200414131542.25608-24-joro@8bytes.org> References: <20200414131542.25608-1-joro@8bytes.org> <20200414131542.25608-24-joro@8bytes.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: DC9F0778244307DCB8C3501248E21D926B064F0B379D3F613D6C01BFC66E127F2000: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 T24gVHVlLCAyMDIwLTA0LTE0IGF0IDE1OjE1ICswMjAwLCBKb2VyZyBSb2VkZWwgd3JvdGU6DQo+ IEZyb206IEpvZXJnIFJvZWRlbCA8anJvZWRlbEBzdX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