From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3A4FEC4167B for ; Wed, 29 Nov 2023 01:01:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C39C310E5D4; Wed, 29 Nov 2023 01:01:34 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0BC0410E5D6 for ; Wed, 29 Nov 2023 01:01:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701219691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GSGCciYfFxwIPQRFv+/e0JSlg77OghN2r+cuBAMmVKU=; b=R+61dFwf/wBo9HltzcQD/Og99EUKTkySWks1oPvrNP9aQ9vlem8xKNLIuda7ctDmmMSrEN PGU8cu9ES4ufUHa94it7TGO1+hlPfyDEmmg5B5n8WAbhk4oFIHZglUXBDfOQQn5+uCNie/ Sl8rFDQ/dl7E8iNk10ezZm5EYWsDRCg= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-636-Z02D1SkwNvKdf1WdKGTiDg-1; Tue, 28 Nov 2023 20:01:29 -0500 X-MC-Unique: Z02D1SkwNvKdf1WdKGTiDg-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a00dd93a5f1so495655566b.2 for ; Tue, 28 Nov 2023 17:01:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701219687; x=1701824487; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GSGCciYfFxwIPQRFv+/e0JSlg77OghN2r+cuBAMmVKU=; b=i0hSF9FJ/BjeXDRg7wOx7V9igKg/dwy/McCUMG0OivU62hWoPb3a0skFntUqN8Ossn Wls/Al82slXOsmLMWtXdsKjjIrdNNtqjy1Ww0NbpanQMH6sXQNJDeMtXANE7z+BA97UX UaXOpHPGA/AnFm0vcBVUT4iHO9MNQb9/+Hd9v4MYc3TpRS/U/F0SjQoxGYXwZ24poYmc St/R68/PhUInZhTH87tpawB+OEzTo58q2yxY0Hn4FRcdJU/ppyfzwt7OsVUYjBZHgsCk 8aZUQ0ETOJVpnUfdy3GmQ2IdaKNiGjT/U5PDfnoG8Hi1dHVphgP9fVNWRxUgcdHNfYcp /jSg== X-Gm-Message-State: AOJu0Yz1Q/x3Tq0dQITf1NyOp4bnK3360ByE5g4/142dKmg+NrMPSvwP /HZIu7t29ApNHc9yvPPwDJ2VWRhqMUbuz8leeQtq0VLvvZvw/8sQ2QsYg4dqd3VnBF1nTmND2Eo gG0xzGJKqw6lBS8TlSYiFLnSR2XCNzWpoMw== X-Received: by 2002:a17:906:2886:b0:9fd:1cd7:f68d with SMTP id o6-20020a170906288600b009fd1cd7f68dmr12528227ejd.67.1701219687675; Tue, 28 Nov 2023 17:01:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQeFU/7OCm3a5OIDfphx7EB9HRSJKIcJpYxpSBNBkpXwboirjbwJAVpjyUf3WaykM2UmUoVQ== X-Received: by 2002:a17:906:2886:b0:9fd:1cd7:f68d with SMTP id o6-20020a170906288600b009fd1cd7f68dmr12528216ejd.67.1701219687427; Tue, 28 Nov 2023 17:01:27 -0800 (PST) Received: from ?IPV6:2a02:810d:4b3f:de9c:abf:b8ff:feee:998b? ([2a02:810d:4b3f:de9c:abf:b8ff:feee:998b]) by smtp.gmail.com with ESMTPSA id o12-20020a1709064f8c00b00a01892903d6sm7264891eju.47.2023.11.28.17.01.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Nov 2023 17:01:26 -0800 (PST) Message-ID: <4b10068c-4285-41df-b4bb-4c61ac70a30b@redhat.com> Date: Wed, 29 Nov 2023 02:01:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Timur Tabi , "gustavoars@kernel.org" References: <6517a6a41eb72d16596c913dc56467e0390287a3.camel@nvidia.com> From: Danilo Krummrich Organization: RedHat In-Reply-To: <6517a6a41eb72d16596c913dc56467e0390287a3.camel@nvidia.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Nouveau] [PATCH][next] nouveau/gsp: replace zero-length array with flex-array member and use __counted_by X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "nouveau@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "daniel@ffwll.ch" , "linux-kernel@vger.kernel.org" Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" On 11/16/23 20:55, Timur Tabi wrote: > On Thu, 2023-11-16 at 20:45 +0100, Danilo Krummrich wrote: >> As I already mentioned for Timur's patch [2], I'd prefer to get a fix >> upstream >> (meaning [1] in this case). Of course, that's probably more up to Timur to >> tell >> if this will work out. > > Don't count on it. I see. Well, I think it's fine. Once we implement a decent abstraction we likely don't need those header files in the kernel anymore. @Gustavo, if you agree I will discard the indentation change when applying the patch to keep the diff as small as possible. - Danilo > > Even if I did change [0] to [], I'm not going to be able to add the > "__counted_by(numEntries);" because that's just not something that our build > system uses. > > And even then, I would need to change all [0] to []. > > You're not going to be able to use RM's header files as-is anyway in the > long term. If we changed the layout of PACKED_REGISTRY_TABLE, we're not > going to create a PACKED_REGISTRY_TABLE2 and keep both around.  We're just > going to change PACKED_REGISTRY_TABLE and pretend the previous version never > existed. You will then have to manually copy the new struct to your header > files and and maintain two versions yourself. > > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1E11FC4167B for ; Wed, 29 Nov 2023 01:01:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F37B710E5D6; Wed, 29 Nov 2023 01:01:33 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id C3A6910E5D4 for ; Wed, 29 Nov 2023 01:01:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701219690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GSGCciYfFxwIPQRFv+/e0JSlg77OghN2r+cuBAMmVKU=; b=Ba3UZdr0ViBX0EW5P1G8waoDJ9p4kFWRF/L5B88n7UIGdshqfhVafTPZVknFwOdIyMONTj 6cFuflTuS/ys08ix/QtnBcMU0180ashAM3iTNeD88xRsfc7m1Cjcz6Dnuru+Mqs9fC5ukJ Zezdb7I7QSGUPLt/cNN9L3yc3GLMYI4= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-440-dcDlmEnQPNOWTKHCmy7SvQ-1; Tue, 28 Nov 2023 20:01:28 -0500 X-MC-Unique: dcDlmEnQPNOWTKHCmy7SvQ-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a01c7b09335so496844166b.1 for ; Tue, 28 Nov 2023 17:01:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701219687; x=1701824487; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GSGCciYfFxwIPQRFv+/e0JSlg77OghN2r+cuBAMmVKU=; b=GpVCTwYRDtp8TNUWOv5Do2RLP9UTNQIeyWmg7sYi7O11lH5yV+LfXTWKNPVRJq/BSH IVII44VvzPpWtrVUFtutXbWYCQP39+YqBbPehOXa+FB8dXkS9TIxEg+pGyU5agxnyEUo E5SM5JF5nwS7I9mKgIYo8wKtsBVRlpdev/gvceDSIZnnEAAT5lp9I5PmOsXCkUs1kxNn 6f9LpMfrM6zsSrVYQ+A/PRkKtY9R9FOrJ88jcJLwpvRAOa3wCJM5Sj9uYxf5+QLup4BY iZuwRTA0+A2aqJ+DdMArQxp2mV9v5iXWRh1/N67EgQB22MG/TIlnMOYne30RM7Ph7IvD MEvQ== X-Gm-Message-State: AOJu0YwDUgfZj4w0uy6qGwU0qBGOwZao90OdClaYqHUPCGxV2ClJeYLU BiPh1/c12i3/BPWbAbkO0HJ3vqBRshsJ2GPASO0l2oHb9QuFKs7dPfSPR2XD38mLhhwWSOmtHok J6/kpnnawqHmn+Ea5iVNBansG/MAU X-Received: by 2002:a17:906:2886:b0:9fd:1cd7:f68d with SMTP id o6-20020a170906288600b009fd1cd7f68dmr12528226ejd.67.1701219687673; Tue, 28 Nov 2023 17:01:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQeFU/7OCm3a5OIDfphx7EB9HRSJKIcJpYxpSBNBkpXwboirjbwJAVpjyUf3WaykM2UmUoVQ== X-Received: by 2002:a17:906:2886:b0:9fd:1cd7:f68d with SMTP id o6-20020a170906288600b009fd1cd7f68dmr12528216ejd.67.1701219687427; Tue, 28 Nov 2023 17:01:27 -0800 (PST) Received: from ?IPV6:2a02:810d:4b3f:de9c:abf:b8ff:feee:998b? ([2a02:810d:4b3f:de9c:abf:b8ff:feee:998b]) by smtp.gmail.com with ESMTPSA id o12-20020a1709064f8c00b00a01892903d6sm7264891eju.47.2023.11.28.17.01.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Nov 2023 17:01:26 -0800 (PST) Message-ID: <4b10068c-4285-41df-b4bb-4c61ac70a30b@redhat.com> Date: Wed, 29 Nov 2023 02:01:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Nouveau] [PATCH][next] nouveau/gsp: replace zero-length array with flex-array member and use __counted_by To: Timur Tabi , "gustavoars@kernel.org" References: <6517a6a41eb72d16596c913dc56467e0390287a3.camel@nvidia.com> From: Danilo Krummrich Organization: RedHat In-Reply-To: <6517a6a41eb72d16596c913dc56467e0390287a3.camel@nvidia.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "nouveau@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 11/16/23 20:55, Timur Tabi wrote: > On Thu, 2023-11-16 at 20:45 +0100, Danilo Krummrich wrote: >> As I already mentioned for Timur's patch [2], I'd prefer to get a fix >> upstream >> (meaning [1] in this case). Of course, that's probably more up to Timur to >> tell >> if this will work out. > > Don't count on it. I see. Well, I think it's fine. Once we implement a decent abstraction we likely don't need those header files in the kernel anymore. @Gustavo, if you agree I will discard the indentation change when applying the patch to keep the diff as small as possible. - Danilo > > Even if I did change [0] to [], I'm not going to be able to add the > "__counted_by(numEntries);" because that's just not something that our build > system uses. > > And even then, I would need to change all [0] to []. > > You're not going to be able to use RM's header files as-is anyway in the > long term. If we changed the layout of PACKED_REGISTRY_TABLE, we're not > going to create a PACKED_REGISTRY_TABLE2 and keep both around.  We're just > going to change PACKED_REGISTRY_TABLE and pretend the previous version never > existed. You will then have to manually copy the new struct to your header > files and and maintain two versions yourself. > > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6B29C07E98 for ; Wed, 29 Nov 2023 01:01:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230132AbjK2BB2 (ORCPT ); Tue, 28 Nov 2023 20:01:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbjK2BB0 (ORCPT ); Tue, 28 Nov 2023 20:01:26 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E78C1707 for ; Tue, 28 Nov 2023 17:01:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701219690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GSGCciYfFxwIPQRFv+/e0JSlg77OghN2r+cuBAMmVKU=; b=Ba3UZdr0ViBX0EW5P1G8waoDJ9p4kFWRF/L5B88n7UIGdshqfhVafTPZVknFwOdIyMONTj 6cFuflTuS/ys08ix/QtnBcMU0180ashAM3iTNeD88xRsfc7m1Cjcz6Dnuru+Mqs9fC5ukJ Zezdb7I7QSGUPLt/cNN9L3yc3GLMYI4= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-373-uKFA-c_qPkmjqU5_hNC6OA-1; Tue, 28 Nov 2023 20:01:28 -0500 X-MC-Unique: uKFA-c_qPkmjqU5_hNC6OA-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a01c7b09335so496844266b.1 for ; Tue, 28 Nov 2023 17:01:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701219687; x=1701824487; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GSGCciYfFxwIPQRFv+/e0JSlg77OghN2r+cuBAMmVKU=; b=OazplOfANBDsSRN5PHBd/RwfTq6sMmRFQ8QLVocET0WrD97fXc4HYlAg/AgFBf4BlL 7kghXqMSHGgFyT6xQ7BUBAP+SB+vg/99kKQBEBlL3GBrydO8XCeS/kQX787psfIYaO31 Gw1XXIPFbV9+trYl94XKmQxTogon+NVOYjZxtYng7OS1d5HW7A+h87D+lSQJ92dNjmeb 0m7aGPo7Whf+K5gxzJEsOR6++Pz9O3c6sL3GQdSCeBEM+DX1246Ysw2aidzwThVyKYJH zNRivdYaZF+8PVat9ZWwzScz0U4u9z00CqOqB85n4vTOYxGJVkenjYRKG++LrqQ0dudl 1xkQ== X-Gm-Message-State: AOJu0Yx6jmzrYziMh2Y9k8aZ8opj8lDBVlUpSxp90Gxeea02icVxWK3X VukY8koULMp/pNHaLOo0sB1MhZ9j4HDj5YAbL3C0h6U8ZDiaHLkQUv9+JLrlXvxaoSoQKsTEr48 BFYyjHMdEA+NW4nXihom5UC82 X-Received: by 2002:a17:906:2886:b0:9fd:1cd7:f68d with SMTP id o6-20020a170906288600b009fd1cd7f68dmr12528230ejd.67.1701219687679; Tue, 28 Nov 2023 17:01:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQeFU/7OCm3a5OIDfphx7EB9HRSJKIcJpYxpSBNBkpXwboirjbwJAVpjyUf3WaykM2UmUoVQ== X-Received: by 2002:a17:906:2886:b0:9fd:1cd7:f68d with SMTP id o6-20020a170906288600b009fd1cd7f68dmr12528216ejd.67.1701219687427; Tue, 28 Nov 2023 17:01:27 -0800 (PST) Received: from ?IPV6:2a02:810d:4b3f:de9c:abf:b8ff:feee:998b? ([2a02:810d:4b3f:de9c:abf:b8ff:feee:998b]) by smtp.gmail.com with ESMTPSA id o12-20020a1709064f8c00b00a01892903d6sm7264891eju.47.2023.11.28.17.01.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Nov 2023 17:01:26 -0800 (PST) Message-ID: <4b10068c-4285-41df-b4bb-4c61ac70a30b@redhat.com> Date: Wed, 29 Nov 2023 02:01:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Nouveau] [PATCH][next] nouveau/gsp: replace zero-length array with flex-array member and use __counted_by Content-Language: en-US To: Timur Tabi , "gustavoars@kernel.org" Cc: "nouveau@lists.freedesktop.org" , "daniel@ffwll.ch" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" References: <6517a6a41eb72d16596c913dc56467e0390287a3.camel@nvidia.com> From: Danilo Krummrich Organization: RedHat In-Reply-To: <6517a6a41eb72d16596c913dc56467e0390287a3.camel@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/16/23 20:55, Timur Tabi wrote: > On Thu, 2023-11-16 at 20:45 +0100, Danilo Krummrich wrote: >> As I already mentioned for Timur's patch [2], I'd prefer to get a fix >> upstream >> (meaning [1] in this case). Of course, that's probably more up to Timur to >> tell >> if this will work out. > > Don't count on it. I see. Well, I think it's fine. Once we implement a decent abstraction we likely don't need those header files in the kernel anymore. @Gustavo, if you agree I will discard the indentation change when applying the patch to keep the diff as small as possible. - Danilo > > Even if I did change [0] to [], I'm not going to be able to add the > "__counted_by(numEntries);" because that's just not something that our build > system uses. > > And even then, I would need to change all [0] to []. > > You're not going to be able to use RM's header files as-is anyway in the > long term. If we changed the layout of PACKED_REGISTRY_TABLE, we're not > going to create a PACKED_REGISTRY_TABLE2 and keep both around.  We're just > going to change PACKED_REGISTRY_TABLE and pretend the previous version never > existed. You will then have to manually copy the new struct to your header > files and and maintain two versions yourself. > > >