Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6796116pxv; Fri, 30 Jul 2021 02:33:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa+M59l5M8u6szxo/DEzyQUSyi4M6iE889HQIpgsF9afXSO4VW203I4gXmr4dnNYzBQ3ka X-Received: by 2002:aa7:cd71:: with SMTP id ca17mr1894230edb.58.1627637630801; Fri, 30 Jul 2021 02:33:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627637630; cv=none; d=google.com; s=arc-20160816; b=jO/b3S17MW3lVXlnHPya/Xt9uQUl1eQDzP+HhJO0CInlaSelQZ6owWjSreRO5dKQdq c8o33YdBi/mHtFZmycfE74xi5hOz/Gse3PPsep/cAr89VtM7i0UlaCf1wbBjnl3cDCQf ed9vWRQ/a2CeiMhHEvIEHCgpMltgRubDUxV+j/oIdlrXHa6umPTZDMZXpsIByfOWhViD xtMr0ZD+7wrPSSl9xkwupRpRqAIcyaBmbMy+xXckXH6LbyP0/SuVecwqeAMwAoaxXqef odWlJgrnChpHDWC3GZT7z4S5mJxtn3lxlJoFXDjhGuLKBuVnDEmmv2oFOqAfZQdQnQzJ YVWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=f8ZWMHHc2Lzy1so91uQOvvF+YHMcuXp3i590hglYW/0=; b=kyAVuvF5Doslam/iWCFDpISQnEdh2OnHLwgXA1XLhgWAMQB8JZDZsB7CwbdHGvgnKc X1nramaopf5SbjHaKEPSk+DVR7ioUMSWoqWXFHXDWx2AVtAamqBULLQT26bFnsInMEV1 M8usgFabGvzTd0laXkF/cGibZzKnUPJxuMf2dqGrs/OYCoh391UOQfSrBqUqj+P0gcP2 RZoBZhrW1zxLvV+Uatllh66iTZT3AzGMhh83SUdjtTxVeWRcItCzAyNa+EDot+KG3eO3 TLzmCKpD7jQTMch1BEcf+kbZF7vo0LGulp0LNBcBXY6FqB8nNCrqdmcvb5Uarf0ywJon vefg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Fx77fDgw; 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 g22si1178073edb.11.2021.07.30.02.33.26; Fri, 30 Jul 2021 02:33:50 -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=Fx77fDgw; 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 S230462AbhG3JcI (ORCPT + 99 others); Fri, 30 Jul 2021 05:32:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238095AbhG3JcH (ORCPT ); Fri, 30 Jul 2021 05:32:07 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 515A1C0613D3 for ; Fri, 30 Jul 2021 02:32:03 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id n19so10752263ioz.0 for ; Fri, 30 Jul 2021 02:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=f8ZWMHHc2Lzy1so91uQOvvF+YHMcuXp3i590hglYW/0=; b=Fx77fDgwTtiSAGHabutbrjOyCZjKbo7MH/4iCNF+bzQi2dSATPXmG9Vu8ojRPSJsed IuEP5hk4WZWBzspgjApfNEshHGFbR7QT12J1ByuPTS5EIDGqT8xBg8tnTl95cIKGoNXp vxkAaeOKzZx5FUFu4YT8Ad0RuBQqh8K4pMFEWlFBwcpNtI9wIOKwgcpXQKg19clZUrzz 9+LaqD2QqWicqMe4D6jCjRJlY9p9hcw+lYy6q6h7pXKkx9ev1mwqNzL+pCUEjNRQtCOL 3KmecR8yZL4z5Ng7535bbfigmn7rXXRTiIbuijeBjZvipdq5sD6fWp/FMKcOoDkfy2Dz t5pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f8ZWMHHc2Lzy1so91uQOvvF+YHMcuXp3i590hglYW/0=; b=fZ/DnhO2Ezug+cq7mPzcnQcHFithYsST/WJjnfUwKxuiHXbAoTyLjSUPEU7/pWvHq9 iZkUL4z1NgAF54EQTcOWDTpPwrc6QxjzQSXbVyFgAibhK9GqfQQc3tRxfnjpRQJk7nV/ e9uWscHgVlqBgFlLOKo0r20kCaIAXUl/38kctLEn2iBVin0ITit6FPpdD9XsYJv0ZPX0 hPXiKV+g/P8+HrczvT8VRdKdn23UgQxZ6irZiv30rnonDH5MDW1y+eXqYhFfX+i++g61 z95gd9d/tVRoXAYQiB5qkrIWoIq1MlSbfGjBZu3IHblutjgP6if/mg10MrftnKQLZ83U o+9w== X-Gm-Message-State: AOAM532/EUZVrRMyjQL+hdbI+EDOEqOMygO4IAvJNhmicL1qEGw41+wx CSCYlfxa9GOJMQAG2+3RuNFkZsMcbUmpmWETcJ+zoQ== X-Received: by 2002:a02:7f12:: with SMTP id r18mr1435455jac.50.1627637522473; Fri, 30 Jul 2021 02:32:02 -0700 (PDT) MIME-Version: 1.0 References: <20210727101051.24418-1-yunfei.dong@mediatek.com> <20210727101051.24418-2-yunfei.dong@mediatek.com> In-Reply-To: <20210727101051.24418-2-yunfei.dong@mediatek.com> From: Tzung-Bi Shih Date: Fri, 30 Jul 2021 17:31:51 +0800 Message-ID: Subject: Re: [PATCH v3, 01/15] media: mtk-vcodec: Get numbers of register bases from DT To: Yunfei Dong Cc: Alexandre Courbot , Hans Verkuil , Tzung-Bi Shih , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa , Hsin-Yi Wang , Fritz Koenig , Irui Wang , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 27, 2021 at 06:10:37PM +0800, Yunfei Dong wrote: > +static int mtk_vcodec_get_reg_bases(struct mtk_vcodec_dev *dev) > +{ > + struct platform_device *pdev = dev->plat_dev; > + int reg_num, i, ret = 0; ret don't need to be initialized. > + for (i = 0; i < reg_num; i++) { > + dev->reg_base[i] = devm_platform_ioremap_resource(pdev, i); > + if (IS_ERR((__force void *)dev->reg_base[i])) { > + return PTR_ERR((__force void *)dev->reg_base[i]); > + } { } can be removed.