Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2610308pxb; Tue, 24 Aug 2021 03:27:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5q3dDacHC8DsC3wmfwB7e1lZkVkGuiiaQOMJL+QyTXTwA2sBtxRn0oWqBwdMtJN6s01IW X-Received: by 2002:a5d:9247:: with SMTP id e7mr12258902iol.161.1629800825753; Tue, 24 Aug 2021 03:27:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629800825; cv=none; d=google.com; s=arc-20160816; b=MVFM1sO9ganuDg+ja+XUw5lRCzB1MlnW0PXbt1xYKrEkK/BJ835Iz9kqzdcdvuaT4n aB0vVVimvmiMssWcAT44LPocrZjXAzY0xzOE/bp41a9ca/J3yxq7D7kSsc1TgQ7F9wLG 66XtF0xXwCvbpNVaC7mhg7P/SK53v/nQH5xDZi5VLO48zCeonIQEP4NFZ1mIqJkHIg9+ k+BWan01Kq9MXmtFMm3qvNNtyqYeayvxPNw872BPUfYKl6Bowg9el0aweu0cWjvDkdYm HzbbAAM+fPHRxVfKuPi6Ae2h4H4yZQrsiZ1dSLGg4kkD9Xpjue0Gxu/RzoU3lh77lijF GMpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0qA56lHF3PwgnWhkGOpQMcKDSscYjYL3TjQAdBAX2/E=; b=MUFxAsC/yrBmXQHm2h6m458Qr3ssGpZsUKZGxtBbxkGgxBA5ZZIhguiHEflJPFO/rW iMg7lzg8fccUccyO4YDVrLoyd9awQO2UC4QNuIbxA8Jz974AKHuKFuS0anbUNNUG7fuf 0/8eMKiBnDPaA/VJHfBlTWF1zT7wCNf3l1X3UHlIHCfaoOvtBYAWZj1wJGF6pL60mNaG 4SKgnqz5z141Uuh/2akrPzN5XymExmOIP0EyhplAc9tWbb5iiRnGsXx+o2JMn2wU60eY UH51W32saDq/70nV9D0hwnzEXy502SgwVUvqB8lb1QEKJUd0zvSj8rjMRB2D62O91YJn fgZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="OYnUiU/n"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id az16si17154308jab.108.2021.08.24.03.26.52; Tue, 24 Aug 2021 03:27:05 -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=@google.com header.s=20161025 header.b="OYnUiU/n"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236286AbhHXKZU (ORCPT + 99 others); Tue, 24 Aug 2021 06:25:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236094AbhHXKZT (ORCPT ); Tue, 24 Aug 2021 06:25:19 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89A84C061764 for ; Tue, 24 Aug 2021 03:24:35 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id g14so17933509pfm.1 for ; Tue, 24 Aug 2021 03:24:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0qA56lHF3PwgnWhkGOpQMcKDSscYjYL3TjQAdBAX2/E=; b=OYnUiU/nZmeU0kxrvNOScIJXtl6UXKmEuHbCq+uUf/AaRlVOFYyPn8ZpWBlbAk03qf AWQn/KhHq2S+LPMjBjduQ23fXGF+EJkPXMcFA+fxywJvS5cbQxrWE5fscdRhAqXBMn0/ 5k89WPs/NQ1MQqNFO0ugGgczcAtrlsYl43MjFYBa/YNGtrNSd49sRavTBW4DroLx/vaq 9DuqBb+VvkH002neoLOckr6Uj2DfKJVpLztKc6dp9sGD6NJx8xIDil+Fk3ygymcD7SZO OADRVjJy1WqyoiN6+hF6CZDJpCXW+apXn/ASYJt/UpN/Y8hMNX66Dc7T+IGB7WoKdQVA zvAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0qA56lHF3PwgnWhkGOpQMcKDSscYjYL3TjQAdBAX2/E=; b=dx5dFFEiqPe2RxhhFVMYXBauwhl9IIOAQk+eue3NCrLkFQngl0pslun3061Z7XnNBE fww4S29ce8uXiDwVkep4Jk0Rr31FPrOJ59FXiSAsE0q5fRtZrbm59pidfDYClpaL6vCs qTEH0H4dBVffLaJFv0IeS3m99rSnrasv+YPzmBN80vdCcCgkSA8vJq5rEo/uiiKLA2wp VqrUMd/9JHydBR8IoXvSiKx3Q1v6HA2sxWYWK1MgaV7UVTBAKNM8GbnMt9fJkaf6Zimt WUHdLTb0SXW3K3FeKUK5pRMzQL85ZA01ViXwAmIx8gKcp8WEFih7TndnjwjPRjczZs// dDfA== X-Gm-Message-State: AOAM532aduAPbv+ZVIknBxEtr4JWPN+qns2tXBEeNG+21K9qG7GSJpuG LRHx1J0vyfKoOzN0hC0G9iv0Hg== X-Received: by 2002:a63:e70f:: with SMTP id b15mr36824531pgi.182.1629800674814; Tue, 24 Aug 2021 03:24:34 -0700 (PDT) Received: from google.com ([2401:fa00:1:10:4a93:46f4:da9a:4371]) by smtp.gmail.com with ESMTPSA id r78sm19381040pfc.206.2021.08.24.03.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Aug 2021 03:24:34 -0700 (PDT) Date: Tue, 24 Aug 2021 18:24:29 +0800 From: Tzung-Bi Shih To: Irui Wang Cc: Hans Verkuil , Tzung-Bi Shih , Alexandre Courbot , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa , Yong Wu , Hsin-Yi Wang , Maoguang Meng , Longfei Wang , Yunfei Dong , Fritz Koenig , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com Subject: Re: [PATCH 5/9] media: mtk-vcodec: Rewrite venc clock interface Message-ID: References: <20210816105934.28265-1-irui.wang@mediatek.com> <20210816105934.28265-6-irui.wang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210816105934.28265-6-irui.wang@mediatek.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 16, 2021 at 06:59:30PM +0800, Irui Wang wrote: > -void mtk_vcodec_enc_clock_on(struct mtk_vcodec_pm *pm) > +void mtk_vcodec_enc_clock_on(struct mtk_vcodec_dev *dev, int core_id) > { > - struct mtk_vcodec_clk *enc_clk = &pm->venc_clk; > - int ret, i = 0; > + struct mtk_venc_comp_dev *venc; > + struct mtk_vcodec_pm *enc_pm; > + struct mtk_vcodec_clk *enc_clk; > + struct clk *clk; To be neat, remove the extra spaces. > - ret = mtk_smi_larb_get(pm->larbvenc); > - if (ret) { > - mtk_v4l2_err("mtk_smi_larb_get larb3 fail %d", ret); > - goto clkerr; I may miss the context but why does it remove mtk_smi_larb_get()? > -void mtk_vcodec_enc_clock_off(struct mtk_vcodec_pm *pm) > +void mtk_vcodec_enc_clock_off(struct mtk_vcodec_dev *dev, int core_id) > { > - struct mtk_vcodec_clk *enc_clk = &pm->venc_clk; > - int i = 0; > + struct mtk_venc_comp_dev *venc; > + struct mtk_vcodec_pm *enc_pm; > + struct mtk_vcodec_clk *enc_clk; > + int i; > > - mtk_smi_larb_put(pm->larbvenc); Same here. Why does it remove mtk_smi_larb_put()? > int mtk_venc_enable_comp_hw(struct mtk_vcodec_dev *dev) > { > int i, ret; > struct mtk_venc_comp_dev *venc_comp; > + struct mtk_vcodec_clk *enc_clk; > + int j = 0; It doesn't need to be initialized. Can inline to "int i, ret;".