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 3793F13790B; Wed, 7 Aug 2024 16:26:06 +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=1723047967; cv=none; b=kCWC5bqWgxRF+Lh621zDY8WPVdYqzbeKfXNsIvn3LSKyCrVr159e/2XTen47glJTtuVgdEbpQByBDJcajv2FX+mxq4F9+h7KNGZTaQYn7cyD5vFjLwnTzXYE9XzPqouavG7NekzxtPelMnTqfkgM0z9c3e13knHxWSnPbGMDLKY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723047967; c=relaxed/simple; bh=NlfN2rUAhsrwn8aZBO67G/atzrzfQzCsN3/oacVA/zc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=By+3Or6ZWkgPtIzwf9OwRfelaCdgNEEDXc0L0gPkJzuSNxzr0BQLJOAKXOHxI8Um4vTQIKa8WnqUkvDq3k0CH7p+WmfnojM/WpKNTjfa0eo0nShDEzRIG+ThdKxZsf6TkIYEE2N32NhQIYO4htcrgEUmUdlvymg5/8E/J2MT7yY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gBxTbUvO; 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="gBxTbUvO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7050C32781; Wed, 7 Aug 2024 16:26:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723047966; bh=NlfN2rUAhsrwn8aZBO67G/atzrzfQzCsN3/oacVA/zc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gBxTbUvO8ZkKvCkQ2EamfsSUDd3YfpnSyzG9X2k9EdkBDIehfClv+dxq6A7TFkfDj y7SS6xy0eY5f+8yM1+wwoVMAn8wYU3yWlNTtXCCb5SDE+4UPDqbKGKdB7subr2eK4Z Rka51DVSnM4gZWUNujPkmzDtffjfubz9ys0JaX+P87veeLrUSXgA763bLBuzf0krfM uhk9vMo+C4mL1+13n5kGwYhAaLeeSopahInWSh897efC9Z/xrf8rVp5UuMhONRM31N GbSsThS3zK8NVsmHF6SaWOPbG05TBliutIttnlruqUPoO5irVhUpUGBpc+Yw1gKYt/ 7YtdSoNvmwXfQ== Date: Wed, 7 Aug 2024 17:26:02 +0100 From: Simon Horman To: "Gustavo A. R. Silva" Cc: Potnuri Bharat Teja , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH][next] ethtool: Avoid -Wflex-array-member-not-at-end warning Message-ID: <20240807162602.GB3006561@kernel.org> References: Precedence: bulk X-Mailing-List: netdev@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 Mon, Aug 05, 2024 at 09:38:08AM -0600, 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. > > Move the conflicting declaration to the end of the structure. Notice > that `struct ethtool_dump` is a flexible structure --a structure that > contains a flexible-array member. > > Fix the following warning: > ./drivers/net/ethernet/chelsio/cxgb4/cxgb4.h:1215:29: 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: Simon Horman