From patchwork Tue Jul 4 11:13:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?WXVuZmVpIERvbmcgKOiRo+S6kemjnik=?= X-Patchwork-Id: 115710 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1139354vqx; Tue, 4 Jul 2023 04:15:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlGdhLt2PZyXlyJfO5dXrVjPW9zy+IF7TtDkP4PzRv6IBZ53uEfsQE5q1uio7398z1yCZNRp X-Received: by 2002:a05:6359:a23:b0:134:c1eb:8744 with SMTP id el35-20020a0563590a2300b00134c1eb8744mr8044649rwb.9.1688469333174; Tue, 04 Jul 2023 04:15:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688469333; cv=none; d=google.com; s=arc-20160816; b=E06hvCkI3IIwTPPKS/rgQPc9YO2jcv8H0HdG8CRCfCiVQw5naoo7Ml/eh+oH/Ce5Er HuqWzxvveMyR/SzCY4XqaT75tTe27hiGJER50rKE5iZy4MKKyWtHbJ8q213e9vaWFRQZ lLdPWME0gu+vW01qcuEgmLMehaNOX6eenY9xrXQldFu3Kg5ygiDPeWoKA7vPrrxQ6GoF AE+rEggQhR3XZerf8asKTAqd/85Okk9iyp646rtRbbPSHb4bh9NeDgTJuLq1e6BjJigt Nv7vV37HSUnTXUGlMExna85vN8qnjaXehWwOimWKG2FnLwIevYcmk8MsWjS6uf9jXBv9 /a0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IhKUWk3HweVVnCZmH7MiqP20PZkaQtj3SSJwS7C570E=; fh=hRh0dkRCnSL0FdUyVBKnNvf+qbxIVe5KZjmuDrMUaZg=; b=DQXTURPISakVGoZZqEGnw2AL7A9ARm9eIbleGcEc3mJu6XIjldg+49pMXiw+b/nCTm 4rMWaJGfT4njtKMtbFHTYzDcyMGEnHfs82OnWrSFY0K0jov2Zp8JI9kt80GUITHEcjkj s5Kpb7kdIv2SkQESJmy3CwEb2KT/WDQ1C/X+u7rqjkJPwuVGM32rqW6Q6Miy3wOg84gc lpBjCM8vkWP5seuELs1d+cBEkJjzBQb1oh5WA+Xw98uEGxqX6xiYIN0h0QFw2pxQv0Rx hv2vODshdBGcqRCAX/qUi3MIielXS3RXRX4RZTtKAAh4a0wyjpPNjc/lR69JnEPOM2h8 w3Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=NbhvcnnT; 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=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b0055b602e0b55si9266494pgq.831.2023.07.04.04.15.19; Tue, 04 Jul 2023 04:15:33 -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=@mediatek.com header.s=dk header.b=NbhvcnnT; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231739AbjGDLOR (ORCPT + 99 others); Tue, 4 Jul 2023 07:14:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231576AbjGDLNv (ORCPT ); Tue, 4 Jul 2023 07:13:51 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC29C10C8; Tue, 4 Jul 2023 04:13:46 -0700 (PDT) X-UUID: d46ab28a1a5b11eeb20a276fd37b9834-20230704 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=IhKUWk3HweVVnCZmH7MiqP20PZkaQtj3SSJwS7C570E=; b=NbhvcnnTxd6frbojn6Uhy+8BLLq9wulVC5Hsp04MWgZXyskZ5moXeXEFjtwBU8bVXYItq2S4ab/0Q56dKArMuXRXqFKUu6GtUucbxhjyfaTk27OhBrlAEYx0CQvN6yJhOdi9Pqmd25rsqlkxxYGNHzgwmvqhq/sbxVwxicheK3c=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.27,REQID:29f2415b-d728-4a4c-8aba-ae2e4a618212,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:70 X-CID-INFO: VERSION:1.1.27,REQID:29f2415b-d728-4a4c-8aba-ae2e4a618212,IP:0,URL :0,TC:0,Content:-25,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTI ON:quarantine,TS:70 X-CID-META: VersionHash:01c9525,CLOUDID:5b25d90d-c22b-45ab-8a43-3004e9216b56,B ulkID:230704191342GN3W7IA0,BulkQuantity:0,Recheck:0,SF:38|29|28|17|19|48,T C:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 ,OSI:0,OSA:0,AV:0,LES:1,SPR:NO X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_FSD,TF_CID_SPAM_SNR,TF_CID_SPAM_SDM,TF_CID_SPAM_ASC, TF_CID_SPAM_FAS X-UUID: d46ab28a1a5b11eeb20a276fd37b9834-20230704 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1125610819; Tue, 04 Jul 2023 19:13:40 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Tue, 4 Jul 2023 19:13:38 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Tue, 4 Jul 2023 19:13:38 +0800 From: Yunfei Dong To: =?utf-8?q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Nicolas Dufresne , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , Nathan Hebert CC: Yunfei Dong , Chen-Yu Tsai , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , , , , , , Subject: [PATCH v5,09/11] media: mediatek: vcodec: fix unreasonable parameter definition and style Date: Tue, 4 Jul 2023 19:13:25 +0800 Message-ID: <20230704111327.7140-10-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230704111327.7140-1-yunfei.dong@mediatek.com> References: <20230704111327.7140-1-yunfei.dong@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770488419430743942?= X-GMAIL-MSGID: =?utf-8?q?1770488419430743942?= Fix unreasonable coding style. Fix unreasonable parameter definition. Signed-off-by: Yunfei Dong Reviewed-by: Nicolas Dufresne Reviewed-by: AngeloGioacchino Del Regno --- .../media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.h | 4 ++-- .../media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.h b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.h index 983a83f7b640..36a4cfa622f5 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.h +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.h @@ -19,7 +19,7 @@ #define IS_VDEC_INNER_RACING(capability) ((capability) & MTK_VCODEC_INNER_RACING) /* - * struct mtk_vdec_format_types - Structure used to get supported + * enum mtk_vdec_format_types - Structure used to get supported * format types according to decoder capability */ enum mtk_vdec_format_types { @@ -256,7 +256,7 @@ struct mtk_vcodec_dec_dev { const struct mtk_vcodec_dec_pdata *vdec_pdata; struct mtk_vcodec_fw *fw_handler; - unsigned long id_counter; + u64 id_counter; /* decoder hardware mutex lock */ struct mutex dec_mutex[MTK_VDEC_HW_MAX]; diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.h b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.h index 4662b7871f74..fcd3d9b271ea 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.h +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc_drv.h @@ -32,13 +32,13 @@ */ struct mtk_vcodec_enc_pdata { bool uses_ext; - unsigned long min_bitrate; - unsigned long max_bitrate; + u64 min_bitrate; + u64 max_bitrate; const struct mtk_video_fmt *capture_formats; size_t num_capture_formats; const struct mtk_video_fmt *output_formats; size_t num_output_formats; - int core_id; + u8 core_id; bool uses_34bit; }; @@ -198,7 +198,7 @@ struct mtk_vcodec_enc_dev { const struct mtk_vcodec_enc_pdata *venc_pdata; struct mtk_vcodec_fw *fw_handler; - unsigned long id_counter; + u64 id_counter; /* encoder hardware mutex lock */ struct mutex enc_mutex;