Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp219265imn; Mon, 25 Jul 2022 14:29:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tDZsx40h6WPZI+x/W5iw8sobJx42SKsAtUU9zVOOSz4fo3YCIPFhVYXYmk97HXxj49navZ X-Received: by 2002:a17:90b:2248:b0:1f2:5de5:29a7 with SMTP id hk8-20020a17090b224800b001f25de529a7mr16035099pjb.197.1658784582867; Mon, 25 Jul 2022 14:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658784582; cv=none; d=google.com; s=arc-20160816; b=eTntItkNxw0uM3SF1gT9r9kDnpnKqVdOBIBpF+w1TgyP21ZW5JOMt+7vxhilcFpz2u 2PxVoadlKT0aLS9wRU6+eMid1A/knCmypSfV131musgrJEespy7m2Wuz7QAFIrjl2XMN FXQS+shhfeETDOlntNbhoOV5U3+2VgNIuNvDSFNeSL9SNI3ZC8gHXhotEcu1wqsNfJPt eJh6IFHgoeTuZpDP7V3wTV+Px45vC+AwTG5SkvK+E/cV+6CYtII1McKASNoyNsdyKxmg mTMWu4JEeMsK0VAdK0oRC00+RV/4SRsfaxJZl1ZiAPGr9p2arYTAqaWusTDVlJwy1G49 qxWQ== 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=Cg/l5r1DnfHeQDhJMEUy4F+4PmlxIavAirIL0/cpxLY=; b=h3BpGhcQ2VRtmRB74fPyab+VilLI+a+pOkZDKkaZ8sDtU1WHqYqEXHKkTqODjBN9qj 969ffgIALlkNm3sY5qWaxOhzWEYTsnAVEbrIcMN9tG9u/ExlyTv2aOY2Gkesf6t3gTfy ssy2fF4VBI02/gI6+KcvaSC9owbxuXrqk5ktOD9DCVaxLGVLD6ZZugpJHjLepN7sMsWK 4ckW4Xndqvd1zcpGdY1d229+VKEEKtQvtFDsorGLRoaOsk8wJgMBEccyNj58B5QfaK1m vDamSGReLIGJLu7Q6jFXeOYDww7GZki2Q1fJofJt9pB0SXnrpcDAlpyzxk25XCdHADUm aJrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hQb7YnD6; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h187-20020a6253c4000000b0051c4e89e5easi13978230pfb.85.2022.07.25.14.29.27; Mon, 25 Jul 2022 14:29:42 -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=@gmail.com header.s=20210112 header.b=hQb7YnD6; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230015AbiGYUrJ (ORCPT + 99 others); Mon, 25 Jul 2022 16:47:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229587AbiGYUrJ (ORCPT ); Mon, 25 Jul 2022 16:47:09 -0400 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BB556420 for ; Mon, 25 Jul 2022 13:47:08 -0700 (PDT) Received: by mail-ot1-x331.google.com with SMTP id g20-20020a9d6a14000000b0061c84e679f5so9565339otn.2 for ; Mon, 25 Jul 2022 13:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=Cg/l5r1DnfHeQDhJMEUy4F+4PmlxIavAirIL0/cpxLY=; b=hQb7YnD6H74svuohwJ5MGhCu6hJIzuKgaz1De63644kZ3X7lWS7VjWdR5dC4VjT4nc 74C49l30iD3MnjL3i6fgY6dKK9DC6cW5jUKNzdehgfOxLpcJWuBwZ0JN15ymAyBpl0f3 wIWbdBwq4vghDxbSls5/cOkQLAVCd4IqybBy3wOkW8Cw8PEcNgHvWXaVzds71Fn0cz7r Kh7pgoX8pDsXQHQL93NlbPjVp2FHhNfcBwIpPxXsHIGmjVhN7vbVjZxXZKwb4NSRIZMI v/+Nk8NfkaHYcE4QPQYgk7U6djHRtVtXHRsrmTDBi8UzaJNWKMHbqGEtsR57/U0d5+pU jnPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Cg/l5r1DnfHeQDhJMEUy4F+4PmlxIavAirIL0/cpxLY=; b=KYmdeRosGuDmNMfQMijuebE8hJLw92/fREpB1BNS37dX4s0ZAGqBUP1Gd8RQKTUel0 gq5QDlzwrXyE6bGMCS6LkKqeBI1ljwLh0Q3FCZhR9+x9hEzC6F7q6h0JkT9a/evmySq4 EBBuLgUrEuYsJQY35Pa5A5KTRlYnG4T8BYsp6HeoJGjWsdcu6Clw78ho/4kzZX+d7OL9 SoGxJq5HoiU9BI5XxY4Kh0ZrqAMT5SyFetsiF/dPwGTupTKFSbTxxbpdfZLQMAEXoZ86 XCZNS+crlD1uGHWO4PPn+ki1ee+aYOyhgxVQhOxzzYnsqjCpbJ7dYbGPdRjbAFTfyuGp 2qsQ== X-Gm-Message-State: AJIora/CyxGkZu+oRyY5rUlwe6lJgf2Kdd+vUrhTqT1D8HW6yXZUtNEw R71+cr4asZfX6KwNxiRxj3M= X-Received: by 2002:a9d:2083:0:b0:61c:dbc8:3d8b with SMTP id x3-20020a9d2083000000b0061cdbc83d8bmr5369503ota.192.1658782027639; Mon, 25 Jul 2022 13:47:07 -0700 (PDT) Received: from ?IPV6:2804:14c:bbe3:4370:95da:f07f:e927:6958? ([2804:14c:bbe3:4370:95da:f07f:e927:6958]) by smtp.gmail.com with ESMTPSA id j5-20020aca6545000000b0033ad9f035a5sm1967963oiw.34.2022.07.25.13.47.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Jul 2022 13:47:07 -0700 (PDT) Message-ID: <4f359e30-90f8-c8bf-4e07-6856fcfd3506@gmail.com> Date: Mon, 25 Jul 2022 17:47:01 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2 Subject: Re: [PATCH 1/2] drm/amd/display: change variables type Content-Language: en-US To: =?UTF-8?Q?Andr=c3=a9_Almeida?= Cc: siqueirajordao@riseup.net, harry.wentland@amd.com, Xinhui.Pan@amd.com, christian.koenig@amd.com, alexander.deucher@amd.com, Rodrigo.Siqueira@amd.com, tales.aparecida@gmail.com, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, mwen@igalia.com, mairacanal@riseup.net, dri-devel@lists.freedesktop.org, isabbasso@riseup.net, andrealmeid@riseup.net, sunpeng.li@amd.com, airlied@linux.ie, daniel@ffwll.ch References: <20220725181559.250030-1-magalilemes00@gmail.com> From: Magali Lemes In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On 7/25/22 16:42, André Almeida wrote: > Hi Magali, > > Às 15:15 de 25/07/22, Magali Lemes escreveu: >> As "dcn3_15_soc" and "dcn3_16_soc" are of type "struct >> _vcs_dpi_soc_bounding_box_st", change their types accordingly. >> > I can see that indeed this type change sense for those variables, but > isn't a bit strange that the type was wrong in the first place? I wonder > if this variable is even used, given that it would very likely throw a > compiler error when using the wrong type and trying to access struct > members that aren't defined. A compilation error would be thrown if either "dc/dcn315/dcn315_resource.h" or "dc/dcn316/dcn316_resource.h" were included in the files where "dcn3_15_soc" and "dcn3_16_soc" are initialized. Since they are not included, the wrong variable type error is not shown. To solve the sparse warning in the second patch of this series, those variables need to be declared first, but they are already declared, we're only missing the headers. If I only add the headers, then those variables will be seen, and I get the expected incompatible variables types error. So, fixing the types here is a preliminary work for the next patch. Magali > >> Signed-off-by: Magali Lemes >> --- >> drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h | 2 +- >> drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h >> index 39929fa67a51..45276317c057 100644 >> --- a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h >> +++ b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h >> @@ -32,7 +32,7 @@ >> container_of(pool, struct dcn315_resource_pool, base) >> >> extern struct _vcs_dpi_ip_params_st dcn3_15_ip; >> -extern struct _vcs_dpi_ip_params_st dcn3_15_soc; >> +extern struct _vcs_dpi_soc_bounding_box_st dcn3_15_soc; >> >> struct dcn315_resource_pool { >> struct resource_pool base; >> diff --git a/drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h b/drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h >> index 0dc5a6c13ae7..d2234aac5449 100644 >> --- a/drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h >> +++ b/drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h >> @@ -32,7 +32,7 @@ >> container_of(pool, struct dcn316_resource_pool, base) >> >> extern struct _vcs_dpi_ip_params_st dcn3_16_ip; >> -extern struct _vcs_dpi_ip_params_st dcn3_16_soc; >> +extern struct _vcs_dpi_soc_bounding_box_st dcn3_16_soc; >> >> struct dcn316_resource_pool { >> struct resource_pool base;