Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp525586rwd; Thu, 1 Jun 2023 03:33:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7aq8kXjKkLjBVSA2cRJE1U6kY78gXNJOOxJ2VGgCFAenzUwN/R0XzYfxM7hGUFwu0HoQts X-Received: by 2002:a17:903:11c6:b0:1ac:b363:83a6 with SMTP id q6-20020a17090311c600b001acb36383a6mr5470427plh.17.1685615599162; Thu, 01 Jun 2023 03:33:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685615599; cv=none; d=google.com; s=arc-20160816; b=MDkikmE3otVjvU4Jr81OH8qVTshh0cYivtsrtbc49/JvFl7Bt20iWVoSsGOvtzse9a MH/pQwosa47WWv7kFDG1ERPwPmda+FgsLcvxtbObs0EY3WIxb0wmDqk4wHlzHKlCXpaE /1yK72NxuXjegTeLXDErISXZDRmaryQEh84yKHIbG8RTqMom49sifYpl7IqTDLT5IOOe Ewt8fNUTZDg04pttBtfKU1nLPOeQ63W0p1kI3Sh6DWZ8WTbNWcvNvcYtSIFmGDRiGBay 9dx/bt0Ug9IN3kjM2rA0L8rWcBlCJKVcmIt3hf+WZ46rPLS28yTiRiDbM0MPYapIFcm7 LOJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=zIvKceeBrzD3QErH6cL4HbavmMBBb8lhJ0TmN8kkJf4=; b=BF9kYMvKvbMsjySpXmppdtfp+adetbYZN8cFvrllJ+8qSSibaDoow6uFx6RopKZaOL rRxIaiD1PPxVTxYw2ba3N+8S2DLuf0Se1CyuFDO469Kvno1reiNwh6zkxdVscfHSnq8C SKIWAw4Qw5a8CNnq0daw163J4P7z4HF4TD05sSvEJvwVlvEsZD2su9RkQ6ERx6+Bugg1 OzBWODZ5bSWG+iBC9jHz8TPkWc1Re5ehIKwKPcbbUvbzfyIWV3yaQwwqikOxzuGAv61x Z8ExoVOlR+ZDNHGf7Y9kj5OduGX0uJ4vbbI8pQQkkYE7QBjFH9PIDCe3uN8ouNTSSJhD EBxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=kUoXbXyN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id li12-20020a170903294c00b001a27afc07d9si1616295plb.146.2023.06.01.03.33.04; Thu, 01 Jun 2023 03:33:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=kUoXbXyN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232480AbjFAKKm (ORCPT + 99 others); Thu, 1 Jun 2023 06:10:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233490AbjFAKKR (ORCPT ); Thu, 1 Jun 2023 06:10:17 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79FBF1BC0; Thu, 1 Jun 2023 03:09:03 -0700 (PDT) Received: from [IPV6:2001:b07:2ed:14ed:a962:cd4d:a84:1eab] (unknown [IPv6:2001:b07:2ed:14ed:a962:cd4d:a84:1eab]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 309466605838; Thu, 1 Jun 2023 11:09:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1685614142; bh=0DH3SQ6KF60gTcR5ThYQNd1f0rnSgcmjQjZkKuVl7Ro=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=kUoXbXyNfE0HOrOILlfjHF7W3KZzTaCj+wCqaphJB9QbwQKoprA809jPe3RZJK/Mh VnXbhXP9PNiGSp0MExLpl1SUPgW5xMPDaCbprhkPWJP7spEpYceZ7d/sbre0SG7heB Ovyq92HgweaE4+HHayWMDKklaUjYrVVNsac2WBm07qM3/qjeoWLATE0Km3sfL07vqy H2ZkicBFl5v7beALdRbVrY8excLIdIH41JhvSnXp4Dbjy4T91v3trxhE/BIYawfxlO 6ByVL8rdBUnAL5mpa145V6Lgdu0cTtQzadrZiKqp7FyHqN45AMvHQ41XW3cArr5TMz 30xny07QTinSA== Message-ID: <71cd6c8b-bb4c-0c9a-4f1a-68df89aa2a90@collabora.com> Date: Thu, 1 Jun 2023 12:08:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH 4/8] mediatek: vcodec: remove the dependency of debug log Content-Language: en-US To: =?UTF-8?B?WXVuZmVpIERvbmcgKOiRo+S6kemjnik=?= , "nhebert@chromium.org" , "wenst@chromium.org" , "nfraprado@collabora.com" , "benjamin.gaignard@collabora.com" , "nicolas.dufresne@collabora.com" , "hverkuil-cisco@xs4all.nl" Cc: "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , "frkoenig@chromium.org" , "stevecho@chromium.org" , "linux-media@vger.kernel.org" , "devicetree@vger.kernel.org" , "daniel@ffwll.ch" , Project_Global_Chrome_Upstream_Group , "hsinyi@chromium.org" , "linux-arm-kernel@lists.infradead.org" References: <20230601030256.29875-1-yunfei.dong@mediatek.com> <20230601030256.29875-5-yunfei.dong@mediatek.com> <1f0509fea9f3326a90e04ee7a0a0ffad0aeb4b9f.camel@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: <1f0509fea9f3326a90e04ee7a0a0ffad0aeb4b9f.camel@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 01/06/23 11:52, Yunfei Dong (董云飞) ha scritto: > Hi AngeloGioacchino, > > Thanks for your suggestion. > On Thu, 2023-06-01 at 11:29 +0200, AngeloGioacchino Del Regno wrote: >> >> External email : Please do not click links or open attachments until >> you have verified the sender or the content. >> Il 01/06/23 05:02, Yunfei Dong ha scritto: >>> 'mtk_vcodec_debug' and 'mtk_vcodec_err' depends on 'mtk_vcodec_ctx' >>> to get the index of each instance, using the index directly instead >>> of with 'mtk_vcodec_ctx'. >>> >>> Signed-off-by: Yunfei Dong >>> --- >>> .../mediatek/vcodec/mtk_vcodec_util.h | 36 +++-- >>> .../vcodec/vdec/vdec_av1_req_lat_if.c | 78 +++++------ >>> .../mediatek/vcodec/vdec/vdec_h264_if.c | 46 +++---- >>> .../mediatek/vcodec/vdec/vdec_h264_req_if.c | 32 ++--- >>> .../vcodec/vdec/vdec_h264_req_multi_if.c | 62 ++++----- >>> .../vcodec/vdec/vdec_hevc_req_multi_if.c | 54 ++++---- >>> .../mediatek/vcodec/vdec/vdec_vp8_if.c | 38 +++--- >>> .../mediatek/vcodec/vdec/vdec_vp8_req_if.c | 36 ++--- >>> .../mediatek/vcodec/vdec/vdec_vp9_if.c | 128 +++++++++-- >> ------- >>> .../vcodec/vdec/vdec_vp9_req_lat_if.c | 67 ++++----- >>> .../platform/mediatek/vcodec/vdec_vpu_if.c | 48 +++---- >>> .../mediatek/vcodec/venc/venc_h264_if.c | 74 +++++----- >>> .../mediatek/vcodec/venc/venc_vp8_if.c | 44 +++--- >>> .../platform/mediatek/vcodec/venc_vpu_if.c | 54 ++++---- >>> 14 files changed, 399 insertions(+), 398 deletions(-) >>> >>> diff --git >> a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h >> b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h >>> index ecb0bdf3a4f4..f018af38b39d 100644 >>> --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h >>> +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h >>> @@ -31,42 +31,38 @@ struct mtk_vcodec_dev; >>> #define mtk_v4l2_err(fmt, args...) \ >>> pr_err("[MTK_V4L2][ERROR] " fmt "\n", ##args) >>> >>> -#define mtk_vcodec_err(h, fmt, args...)\ >>> -pr_err("[MTK_VCODEC][ERROR][%d]: " fmt "\n",\ >>> - ((struct mtk_vcodec_ctx *)(h)->ctx)->id, ##args) >>> +#define mtk_vcodec_err(inst_id, fmt, >> args...) \ >>> +pr_err("[MTK_VCODEC][ERROR][%d]: " fmt "\n", inst_id, ##args) >>> >> >> This *huge* cleanup (congrats btw!) would be a great occasion to >> change those >> pr_err() to dev_err(). Can we do that? >> > > Can change pr_err to dev_err, but need to add one extra parameter "dev" Yes I'm aware of the fact that you have to add a `dev` extra param, of course. > in mtk_vcodec_err. Whether need to change mtk_vcodec_debug? > Yes please, change everything you can to use dev_* prints, that'd be great. Cheers! >> Regards, >> Angelo >> > Best Regards, > Yunfei Dong