From patchwork Wed Jun 7 08:48:59 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: 104350 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp109059vqr; Wed, 7 Jun 2023 01:54:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6k3ialv1QwiJGG6VHcLfWd1I5Yf7Rgw2XP5HEYm9qbf8LTG8+WK3jyqiYAclO8Ahfls/g/ X-Received: by 2002:a05:6a00:1702:b0:653:6e5:2cd with SMTP id h2-20020a056a00170200b0065306e502cdmr5825840pfc.16.1686128077691; Wed, 07 Jun 2023 01:54:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686128077; cv=none; d=google.com; s=arc-20160816; b=o0sYtrqvfiTzpRBxNCtnfZfB3vDz4zwPBZFs9ukVgblwQGlTdM17kJMA867wmR6yQD yQog/3rjXN7SJu/h4h0MII0Li6iC6kKRRyy3xjpGmYvN4nWb/TR5vHK/EZQuMfUoXz8J 5H7L1o9FixFFbzYL6sGw+fAk7L1cBBozlK9WrSaVF92+4kQf1idNjXWdyseM1IUsqjhi Y3/v9vdvcADKuo/py0BNrCsxNo7fcPhh461vxfDwVawBlRraP+zRzGrQH9kesB+hrR03 qNkg2qF2TSudkOEn3bSkcyOz465g4ai8AsJpWXrXXs3X+sRq0I+53xwQ1uWNRSNwA2mi 6JZA== 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=7J44CPJLVuQmKx8uRsJDBq0OUSEiyngOmORztKqfS/o=; b=LSeTmYxaFrMvStSU3EOhOaz+X+N0I+ktg8xJMhFVGS/Cle4P9MoaEOlnc5yzoxSyMN ltZTHa2vGSDkdX5tUUx9Z/t//kPzEZNptugYLqkovqKjo1tRlaqhEjopxzl6KqFz0qaj cJx9K89jW1l8EzIwpTA8zNoDf65t8eKiilxMGQe4se1gqThn69QpY49SwhVkooqXxdtS OkD1YgnX2bxRUti4DzHRBqsEy+/Y7/pWcZ/xS0mFlGmjkk/TQfVkrLHt0x+eU0IlHrzQ Gkxcpvl+Wbzry27NG+4i7zuT7JtBoKEi4y3sxBublWkzuREjSUziSjsYJt3P0QB59Tnh bWZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=qVv++o11; 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 i4-20020a636d04000000b0054130108266si8658180pgc.567.2023.06.07.01.54.25; Wed, 07 Jun 2023 01:54:37 -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=qVv++o11; 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 S239580AbjFGItu (ORCPT + 99 others); Wed, 7 Jun 2023 04:49:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239461AbjFGItV (ORCPT ); Wed, 7 Jun 2023 04:49:21 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9280819BF; Wed, 7 Jun 2023 01:49:19 -0700 (PDT) X-UUID: 2c819a30051011eeb20a276fd37b9834-20230607 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=7J44CPJLVuQmKx8uRsJDBq0OUSEiyngOmORztKqfS/o=; b=qVv++o11ZbmleZDb9BcDItCsh8tPMbRGQ6W7mqKhtP6qMfiAtRkyYTMW/jRXrwwNC6CVuMO6mcti+pT7y/DDAjCJrsUA7Fm9OLsbuLxL3SBuaiJWg0ffWAY7CtrjCibU0yXgkvQcmBxTdwZB+721aoQO20tPzrCTuvvi0bvCGmE=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.25,REQID:7af08a27-4d0c-4fb2-9cbf-73c482360af3,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:d5b0ae3,CLOUDID:dec5a83d-de1e-4348-bc35-c96f92f1dcbb,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: 2c819a30051011eeb20a276fd37b9834-20230607 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 227731814; Wed, 07 Jun 2023 16:49:11 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 7 Jun 2023 16:49:11 +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; Wed, 7 Jun 2023 16:49:10 +0800 From: Yunfei Dong To: Chen-Yu Tsai , Nicolas Dufresne , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , =?utf-8?q?N=C3=ADcolas?= =?utf-8?q?_F_=2E_R_=2E_A_=2E_Prado?= , Nathan Hebert CC: Yunfei Dong , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , , , , , , Subject: [PATCH v2,08/10] mediatek: vcodec: fix unreasonable parameter definition and style Date: Wed, 7 Jun 2023 16:48:59 +0800 Message-ID: <20230607084901.28021-9-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230607084901.28021-1-yunfei.dong@mediatek.com> References: <20230607084901.28021-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,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?1768033434809699950?= X-GMAIL-MSGID: =?utf-8?q?1768033434809699950?= Fix unreasonable coding style. Fix unreasonable parameter definition. Signed-off-by: Yunfei Dong --- .../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 a18ba8f32d41..1a0375dd5b6d 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 { @@ -258,7 +258,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 a88ef9078848..4804d8531a4e 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; }; @@ -208,7 +208,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;