From patchwork Tue May 23 10:23:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sui Jingfeng <15330273260@189.cn> X-Patchwork-Id: 97958 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2044685vqo; Tue, 23 May 2023 03:53:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7g6i0gfNi8omh/GAiocX187BBosWmhYi/QAalHZC65U0xLi9wUWr72OmsZaGFRLyFXQugl X-Received: by 2002:a17:90a:14c6:b0:246:9c75:351a with SMTP id k64-20020a17090a14c600b002469c75351amr14954438pja.12.1684839232098; Tue, 23 May 2023 03:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684839232; cv=none; d=google.com; s=arc-20160816; b=D2Tyry3cms5k3/XYUrPvwWWl2UytBVupXyQD+8WEjYesfNVsZ9E4DdeIbAJFcv5KYU QcUETdx4B3Q/ui8m1Mlg9ML8cF5wk8pyQHhZcbGAPcaal4gKjCEaA/NOurI+2eo+FEG3 8MyJubV+YWrvVkLSWYa540u6/+jT3SayIDcgAVXcuyxieMBfCIhUM8U6KsCxMuFdDiuh W/ZVe6qwBBB3prSRgop0ZzpjdYx3cpNy6qLQJq/ImdVLMRdQusaAFmpRlwC962uqaE8n R87JAJEgCdcTczokiJQJgiV31885Jto2VWLWcMefMa1aspoChVFurjiXeTczSJBm9nKB s2TA== 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 :message-id:date:subject:cc:to:from:sender:hmm_source_type :hmm_attache_num:hmm_source_ip; bh=DJWRWrFS+VSVV19njC5u4O9YmqJhHL5sEbJknbUZxSM=; b=S74oie3sfdwOELuCeja5cYTfjsBaGEtU9HN5gNDtI18oeuY5eZ2XqYhyW+oK2KeHSC cCSQ6xbDUICauUxBtmcv+4q/OYLwucSAPIpFpqpfrij/bjCQpwA8lL8IyBhzHH0wviX/ pz/PZzPUcwrDdrRFwy9gcWKCDhgZZha96I1U6Lvn3n82jhWmEuZ16nGnCoutv3riynk6 ehZU2XRDNOArP4KZ/XTR97hCyHw6InjB/GLytJWkdMUw1mxnENYx7GyqtDoGiTi8sD6X Bf1+VLrzu/h1vRwqmY5YBEuEbB8o02hhXhh7eNq6zdKqx2wRJGu0udbfS/PXaALGAPzH PSBw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c11-20020a63724b000000b0053488ce246dsi773632pgn.463.2023.05.23.03.53.37; Tue, 23 May 2023 03:53:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236558AbjEWKXi (ORCPT + 99 others); Tue, 23 May 2023 06:23:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236550AbjEWKXf (ORCPT ); Tue, 23 May 2023 06:23:35 -0400 Received: from 189.cn (ptr.189.cn [183.61.185.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 46B83189 for ; Tue, 23 May 2023 03:23:33 -0700 (PDT) HMM_SOURCE_IP: 10.64.8.31:47070.371094434 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-114.242.206.180 (unknown [10.64.8.31]) by 189.cn (HERMES) with SMTP id 4E3BB1002CF; Tue, 23 May 2023 18:23:31 +0800 (CST) Received: from ([114.242.206.180]) by gateway-151646-dep-75648544bd-xp9j7 with ESMTP id 90a78cba9ef54891855234465fb649e0 for mripard@kernel.org; Tue, 23 May 2023 18:23:32 CST X-Transaction-ID: 90a78cba9ef54891855234465fb649e0 X-Real-From: 15330273260@189.cn X-Receive-IP: 114.242.206.180 X-MEDUSA-Status: 0 Sender: 15330273260@189.cn From: Sui Jingfeng <15330273260@189.cn> To: Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Sui Jingfeng , Li Yi Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, loongson-kernel@lists.loongnix.cn, Maarten Lankhorst Subject: [PATCH] drm/drm_vblank.c: using u32 instead of the int to store frame size Date: Tue, 23 May 2023 18:23:28 +0800 Message-Id: <20230523102328.372204-1-15330273260@189.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FROM_LOCAL_DIGITS, FROM_LOCAL_HEX,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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?1766681982754011999?= X-GMAIL-MSGID: =?utf-8?q?1766681982754011999?= From: Sui Jingfeng Both mode->crtc_htotal and mode->crtc_vtotal are u16 type, using a u32 is to store the result instead of int. Signed-off-by: Sui Jingfeng Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Cc: loongson-kernel@lists.loongnix.cn --- drivers/gpu/drm/drm_vblank.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index 877e2067534f..a8dfe5551b7c 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -622,7 +622,7 @@ void drm_calc_timestamping_constants(struct drm_crtc *crtc, /* Valid dotclock? */ if (dotclock > 0) { - int frame_size = mode->crtc_htotal * mode->crtc_vtotal; + u32 frame_size = mode->crtc_htotal * mode->crtc_vtotal; /* * Convert scanline length in pixels and video