From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D06A606CF84 for ; Thu, 3 Dec 2026 14:59:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=i/kogeOR Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A6C51112987; Thu, 3 Dec 2026 14:59:45 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.4]) by gabe.freedesktop.org (Postfix) with ESMTPS id 92B83112981 for ; Thu, 3 Dec 2026 14:59:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796309979; x=1827845979; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=aWyXkSseNcBI655Seduftfx9a54d68MnPR2PRhNcGSQ=; b=i/kogeORqqUabEAD0FZj9/uY6f6T4jDI07+5S85XLMEvvlOL3MnFgvlo GOuRrYKF9s1TlH4L4IKE5Hpg5M0eVnoEcmyL9LvVaVry1jz0/Uv3D93j2 xb2PBW44x9RCKWrL2a2lR8V4lPR1rTodBEL/2E8GgntpKQRNw54sigDGh 2dVTYEW/ZLUdOqOUMw6yjBjgfvPrH6WGltXGwQfdULMQriFY7xW9AmEaM jwxVBL/FZqs9EvgAx0Xv3KsRAzEyrfS1D7p/+/Mv5EmxGei9REWrNKuuv LL+ZVNWjTf4nXZj0jDAa/+Zc04QYUVkCbxENEaUwSwDPh3vsxaKbNBg/7 Q==; X-CSE-ConnectionGUID: UEH5WbnyQ2mPivRE0nhTHg== X-CSE-MsgGUID: sStY8/m/T3Wqy2qv71fzKQ== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="25305" X-IronPort-AV: E=Sophos;i="6.29,248,1794902400"; d="scan'208";a="25305" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa114.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 06:59:38 -0800 X-CSE-ConnectionGUID: b9tzZ9HnQHmg1gOk6IYKxQ== X-CSE-MsgGUID: 01ZbwzFUSaesPDSvJ3zIxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,248,1794902400"; d="scan'208";a="13866336" Received: from abityuts-desk1.ger.corp.intel.com (HELO localhost) ([10.245.244.117]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 06:59:36 -0800 Date: Thu, 3 Dec 2026 16:59:32 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Andi Shyti Cc: Krzysztof Karas , intel-gfx@lists.freedesktop.org, Andi Shyti , Janusz Krzysztofik , Sebastian Brzezinka , Krzysztof Niemiec Subject: Re: [PATCH 1/2] drm/i915: Annotate flexible array members that require minimal changes Message-ID: References: <20261119143510.2971237-1-krzysztof.karas@intel.com> <20261119143510.2971237-2-krzysztof.karas@intel.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Patchwork-Hint: comment Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Intel-gfx" X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Thu, Dec 03, 2026 at 03:33:52PM +0100, Andi Shyti wrote: > Hi Ville, > > > > @@ -492,12 +494,14 @@ init_bdb_block(struct intel_display *display, > > > if (section_id == BDB_MIPI_SEQUENCE && *(const u8 *)block >= 3) > > > block_size += 5; > > > > > > - entry = kzalloc_flex(*entry, data, max(min_size, block_size) + 3); > > > + data_size = max(min_size, block_size) + 3; > > > + entry = kzalloc_flex(*entry, data, data_size); > > > if (!entry) { > > > kfree(temp_block); > > > return; > > > } > > > > > > + entry->data_size = data_size; > > > > Are we actually going to do something with this, or what's point? > > if you are referring to the use of the __counted_by() annotation, > the point is that it adds some direction to the compiler for > better and safer bounds checking and that's a more modern way for > handling flexible arrays. > > Krzysztof's series is just a clean up, there is no functional > change. The commit message explains none of it. And if the compiler does something magical with it then I'd expect to see an asm snippet or something to show it. -- Ville Syrjälä Intel