Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1891502ybg; Thu, 4 Jun 2020 23:45:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4qSF/rLnXTLLoLhU/p/G4w76U6dIMZb/PZFWURNkYyPeQYWgcsW/G2aUxq7Ut9qkUpAOi X-Received: by 2002:aa7:cdcb:: with SMTP id h11mr7960529edw.218.1591339531736; Thu, 04 Jun 2020 23:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591339531; cv=none; d=google.com; s=arc-20160816; b=LNFieduPDaRtDdzCC1B8NsUKez7VvrPKAZhJRPR/aYb3P1aL1t7HoZIuHS58t1hK3x AXvuBLtokQMl/7EbC/cjS2kq6KimBb1tvoXJc2oedMFA/eIXkWF5cF7H8X4luxoXX7Xq NUdIwY5mmsdBoezK1TooLt0kKcI/bp7ZY9YjjquDCt2/GeR7yOXFmurtJJm/LVbxXArj 2x2v0LPvV12sNkJSyvzSDSpPuXV0WeyAZLSRN+q9ZamUCm/cW9LGisQKlf9aqo0oe6wc nORjASJieV4ir6tgZF4GcS0s8OvYbnIykLQUqavDIpoKTVa3qvrNNjwe8RXVSiZvbtOu MoaA== 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=82/gwfumID/oDEq9itix4sSuGV1n3vqDdEBL9hhAtBc=; b=tte/Pkq0mNjp/GFWBMDSssy3dgtJDq9ZccRvYU2fsg9OKQCANKoo8Ph1nwijy4K/O2 XKP3LVd5+QDqLR5MdCyS3a6a4UpGg+PA+wDyk+WEcJQUhp69wc/Ks+zia4eNfTwAoPsH d6jc9cvwymqK68pQWgLg7N6rkI25Yz7F77m7oIlHODa62ErjeR7a+e7NZTnTJp3pdzmJ 8bK86TowCLF0S161Z2FHsh6+TMTHjVEFfndGjM+zBR2Ex4HlL+toaDTx3IvXRUhrbEOC zgkH/ptfxQzIX5S/wWKQCderEONIuKvL7E/Hz71V9oviR7jHzvNwbf523f4tht+X7JLU ZkWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=I9HwEpM9; 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 qc4si2872929ejb.369.2020.06.04.23.45.08; Thu, 04 Jun 2020 23:45: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=I9HwEpM9; 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 S1726123AbgFEGnS (ORCPT + 99 others); Fri, 5 Jun 2020 02:43:18 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:17539 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725280AbgFEGnR (ORCPT ); Fri, 5 Jun 2020 02:43:17 -0400 X-UUID: 7f7f76b3478c47d188e95874d889eea5-20200605 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=82/gwfumID/oDEq9itix4sSuGV1n3vqDdEBL9hhAtBc=; b=I9HwEpM9lUYZOY+EBsFEW0vlf7DotszroqJKLhMSAaCr4mGgcJ5HObZGqttRx+JnyTv4TtwWj2opZKrw/2dys62pZMiNfnAQv7BI5iFoU1Eg5emTQmYmQX2sCrieZ0j+B3bVo6tWIek2heBYc/s6heeVCFIAaLM1cTKvEWPkcMk=; X-UUID: 7f7f76b3478c47d188e95874d889eea5-20200605 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1082648919; Fri, 05 Jun 2020 14:43:08 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 5 Jun 2020 14:43:06 +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, 5 Jun 2020 14:43:06 +0800 Message-ID: <1591339263.32607.0.camel@mhfsdcap03> Subject: Re: [PATCH v8 07/14] media: platform: Use kernel native functions for improving code quality From: Xia Jiang To: Tomasz Figa CC: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , "Matthias Brugger" , Rick Chang , , , , , , Marek Szyprowski , , , , , , Date: Fri, 5 Jun 2020 14:41:03 +0800 In-Reply-To: <20200521154137.GG209565@chromium.org> References: <20200403094033.8288-1-xia.jiang@mediatek.com> <20200403094033.8288-8-xia.jiang@mediatek.com> <20200521154137.GG209565@chromium.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: D73C96593E44FF63D98051F58AC859BAAECFB308B2E0EFAE3235D87A954605152000: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 T24gVGh1LCAyMDIwLTA1LTIxIGF0IDE1OjQxICswMDAwLCBUb21hc3ogRmlnYSB3cm90ZToNC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