From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94DB92116ED; Wed, 19 Mar 2025 09:14:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742375645; cv=none; b=Zl4Vnoms0oN7+3kMWzxeK2g89hm1d+HRZicagUZxUNwp0MxMwIerTFnufzglXFdFCstVwHoRwvH9ZoznQspTXvLOF+mAhpFokDnXIBm7dwncj9qiVJQkCmDtuqoOR11+n0j1Abz2j7L3nANz67J73fJ+Ygs0Ervw+ossf+TzPKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742375645; c=relaxed/simple; bh=dLUxq01k+q5g7y95QccNBbmhUY3uJw9W4BKARwlPKGA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SWHAJShczy8UH7BhaMxIVHMGl6ed59KGz5pEamL7Y57ecDZ4KGCO/cti/gmqxbR8mOPEyRDpVddbSAZ0xTA0dSa5GpYUy9hKUy3mYAdyvtpUVsShaqSrKHuSPlqf6L7Luogg71EhqkOEFZ/03JtloVa3EkXD3FZPv5JCMwTZ9H0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jOBhBqIq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jOBhBqIq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7627FC4CEE9; Wed, 19 Mar 2025 09:14:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742375645; bh=dLUxq01k+q5g7y95QccNBbmhUY3uJw9W4BKARwlPKGA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jOBhBqIq3qcz7Q+6e2HEm+55yFEdpjzn9T6K6D1uIKt8BLdAK4YYGxRBGbSv3AyqK IzfyyDdbdpPcL9JZtbcLUM4eU6dN1VyRP3V1eiEYyE8HPngQ1qetpOZbasawoy98we Mekeht5LeCovGlVnKHFA/tZ2bjFVW3XjKWJh4zHcMWUaTN0PepAsWygD/TUf9VcgTl A+JUyc3kgxbDBd84YGLbx6HO7Y/aR8OilRwjn28A544elMRT6nYhE1xCeBLFx8rQwG cIGDvSXf1wzRIJg0f4Dw0Y8jHzJ582/UEblA4pvONu7QZpH9uoW/mUITTuoW71IVi2 SxOmK78ShRIOg== Date: Wed, 19 Mar 2025 09:14:01 +0000 From: Tzung-Bi Shih To: "Gustavo A. R. Silva" Cc: Jonathan Cameron , Lars-Peter Clausen , Benson Leung , Guenter Roeck , linux-iio@vger.kernel.org, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, Kees Cook Subject: Re: [PATCH v2][next] iio: proximity: cros_ec_mkbp_proximity: Avoid -Wflex-array-member-not-at-end warning Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Mar 18, 2025 at 08:31:05PM +1030, Gustavo A. R. Silva wrote: > -Wflex-array-member-not-at-end was introduced in GCC-14, and we are > getting ready to enable it, globally. > > Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of > a flexible structure where the size of the flexible-array member > is known at compile-time, and refactor the rest of the code, > accordingly. > > So, with these changes, fix the following warning: > > drivers/iio/proximity/cros_ec_mkbp_proximity.c:63:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] > > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Tzung-Bi Shih