Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6817665pxv; Fri, 30 Jul 2021 03:10:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgjIyAIXfClSA5s6JBl4xFuoE4I/tfSxo6vjQ18/fLjseJLyIKgd2dvbDp9rg36Cbs5jd4 X-Received: by 2002:a92:d083:: with SMTP id h3mr1386750ilh.157.1627639841179; Fri, 30 Jul 2021 03:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627639841; cv=none; d=google.com; s=arc-20160816; b=lqfU6MllaWoWVR+/ytPAHB8L7lGPqoLXlP29vX8PHxI2Auxz2/W8gU1wGnoAi8tuaC qVzR9xuQNNDnB/Uj+tY0xE5h4AuXmNBNoV+cbk3CyqV+/6Y8oNQ7871cScim0f6c83yY ze91SM0io47q0u62GtKIzm2Nzy/pXNB7j/47Xy0OmfySW6tbmqK6ClDm8qAvu5jKB9Ls iMN4wTpM7v5Z+0QDFOhoIjfHKhHZSr9Gy4kaCUNIk8CPDozK67qlO3LtaV3WjOwX0nsC y1UeUOB/kkK9rPxIweEsWYcD2hHJCcCfGDKEImeoCNxGgT4Y0POsPXFhigRWb/LWNdc8 nidA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=+MONEB/v0z/o0lM+5/eQE63UF505nm7JUV6bxQTHKss=; b=V91ug5XyJv6dr2SXRXJ0Hij+njC2j64XPufXe5kbZ1ewyY02k7ddjJSqjoo+0jld7f HBfWb+XlNuCmMvj+9Kwa+7cuXibn37fjDkMdJHiS5RvQB5x7Z0LNpfGeDNf8+um8IYab j9N4o4Sn2eO+NPnoniBVMYgetQ3mucRAzl8THEN5ElkqGWShYAra7jmVk3gE5L6wsEF+ hQA+U4XW7LSUqKasSPgApXGF3dJ6WRl5/dIJphoj3khXqYW3CNIx8vEgKiW+8VwBfeSZ I3wcPBNNQqiPFwTmxVMKutsfk4HAPeg2cKSBs6fSzUS4RMBUxSnE3kTc9UUeFui8gmFP ioKg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j11si1500282ils.22.2021.07.30.03.10.29; Fri, 30 Jul 2021 03:10:41 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238483AbhG3KJp (ORCPT + 99 others); Fri, 30 Jul 2021 06:09:45 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48286 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238374AbhG3KJo (ORCPT ); Fri, 30 Jul 2021 06:09:44 -0400 Received: from [IPv6:2a02:810a:880:f54:51e7:d967:c146:d0c] (unknown [IPv6:2a02:810a:880:f54:51e7:d967:c146:d0c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dafna) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 98A291F446BD; Fri, 30 Jul 2021 11:09:37 +0100 (BST) Subject: Re: [PATCH v3, 01/15] media: mtk-vcodec: Get numbers of register bases from DT To: Tzung-Bi Shih , 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 References: <20210727101051.24418-1-yunfei.dong@mediatek.com> <20210727101051.24418-2-yunfei.dong@mediatek.com> From: Dafna Hirschfeld Message-ID: Date: Fri, 30 Jul 2021 12:09:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30.07.21 11:31, Tzung-Bi Shih wrote: > 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. I think that also the "__fore void*" can be removed thanks, Dafna >