From patchwork Sat Jul 22 07:42:28 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: 124254 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp706633vqg; Sat, 22 Jul 2023 02:23:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlHbbh0yB8intpX0ryoxUAgcMp8j4l4j9JbfEme3/nKcU3Op6NhU0Lkfb+PZXqNiAN8Io7TH X-Received: by 2002:a05:6358:52c1:b0:129:d242:f782 with SMTP id z1-20020a05635852c100b00129d242f782mr4649427rwz.0.1690017830363; Sat, 22 Jul 2023 02:23:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690017830; cv=none; d=google.com; s=arc-20160816; b=qjvnDz6yqnaeZJUpHlmBdK1L1AAvUIOKiobGfc2nNTMTanJGFh9rC78ntvyuObeF0+ 7XuFUcgIG6TPrUIsURsmOhW6cVWKkOm7JCgXrYi+VsRDeaHkJSUYFqOgKMBTjwkOVQD5 r1R2VeFXpHQHd12BiB3SKpTxuyQkXMMQrr0WrBlluerBNhpTmLmqbBUSggin6J/3iLY5 lLBtW5gwO73PeUNWn4QsQvvPvNl3Xu6kahoiIXe5LrspH2/PDl+70BWVATk49CkKyWbn YZkhEPd3ih0S4/N7fh6gUpd20dWnZ584iA/HZaIi6BZwdpKyGOp6dYKl7Auf2Yy5wWe4 Y97w== 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=MzrtSiKGl4aYuQicr0vbkuPuxjyDXu7jqpRAYhmWTfQ=; fh=dnvkKDphEn4iJqR7Zr9ymMkUoTSWsQaqOPrldMKPwU0=; b=tEOhPWW6sDVdjdJGGDB0ku0ouBgwToGvWTccjMAvB+XbmF6BK3ducrz52sj3nceK0O awLvU+1jeihnNcZoAu0tlkeSTyR5JOvNqhHcCohZRgvuC7ePwrpDOf053AALVr6c5b4X k2mMFvBpmfeHe7rrIrDf8ZA4kml5NZiCIlcujc6vnHYZHUSGXYTHzFKmRTmp8NaFnUO2 fo3f8+sJkX2iBOsYEuft2oqhIZr9gmf6tbAB0iXLbQKxmPlbqP2CiSg4TApptmgGYhXx 7kDbtXU9yREscY2qyd2Dmh0qIZFbNx1+/GinZiDKvNNpVOCSccvFi5LjiJ4a+e6N0Xoz 4JaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=erNrdfJo; 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 v24-20020a63f218000000b0055af0729456si4707695pgh.399.2023.07.22.02.23.37; Sat, 22 Jul 2023 02:23:50 -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=erNrdfJo; 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 S229936AbjGVHm5 (ORCPT + 99 others); Sat, 22 Jul 2023 03:42:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbjGVHmr (ORCPT ); Sat, 22 Jul 2023 03:42:47 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A293C2708; Sat, 22 Jul 2023 00:42:45 -0700 (PDT) X-UUID: 5737f352286311ee9cb5633481061a41-20230722 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=MzrtSiKGl4aYuQicr0vbkuPuxjyDXu7jqpRAYhmWTfQ=; b=erNrdfJosF84jQ9kcF9vXQlNrKSqN2Lww5aLdwtrKmldnuyXsHn5LNtSqXBxBCpTKnogLn86nwJH3LQ5MWwz8mZ0GnAeu4hfLIqlM5MojYL4+OKKfQWt7atHou3wGbE0PeBPWfqf3zYP+G9NQHZ1D7sCzZg7m2ub8jGZSL/+5WI=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.28,REQID:4b404f64-6675-4d12-945a-f3c7ff272174,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:176cd25,CLOUDID:5303f48e-7caa-48c2-8dbb-206f0389473c,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,LES:1,SPR:NO, DKR:0,DKP:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 5737f352286311ee9cb5633481061a41-20230722 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 741761399; Sat, 22 Jul 2023 15:42:42 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Sat, 22 Jul 2023 15:42:41 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Sat, 22 Jul 2023 15:42:40 +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: Chen-Yu Tsai , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , Yunfei Dong , , , , , , Subject: [PATCH v7,09/11] media: mediatek: vcodec: fix unreasonable parameter definition and style Date: Sat, 22 Jul 2023 15:42:28 +0800 Message-ID: <20230722074230.30558-10-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230722074230.30558-1-yunfei.dong@mediatek.com> References: <20230722074230.30558-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_DNSWL_BLOCKED, 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: INBOX X-GMAIL-THRID: 1772112136470814846 X-GMAIL-MSGID: 1772112136470814846 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 533d8d97f704..4122e37aea67 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 { struct regmap *vdecsys_regmap; 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 2f6d0160ff1d..5d410a6b15cc 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;