All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
	Alexander Aring <aahringo@redhat.com>,
	David Teigland <teigland@redhat.com>
Cc: gfs2@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH][next] dlm: Avoid -Wflex-array-member-not-at-end warning
Date: Fri, 30 Jan 2026 15:40:57 +0900	[thread overview]
Message-ID: <7d712992-e006-4787-95ee-e82cfa25f8ff@embeddedor.com> (raw)
In-Reply-To: <aNFbP3UaRokBxruI@kspp>

Hi all,

Who can take this, please?

Thanks
-Gustavo

On 9/22/25 23:20, 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 corresponding
> structure. Notice that `struct dlm_message` is a flexible
> structure, this is a structure that contains a flexible-array
> member.
> 
> Fix the following warning:
> 
> fs/dlm/dlm_internal.h:609:33: 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 <gustavoars@kernel.org>
> ---
>   fs/dlm/dlm_internal.h | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
> index d534a4bc162b..9df842421ae0 100644
> --- a/fs/dlm/dlm_internal.h
> +++ b/fs/dlm/dlm_internal.h
> @@ -606,7 +606,6 @@ struct dlm_ls {
>   
>   	struct dlm_rsb		ls_local_rsb;	/* for returning errors */
>   	struct dlm_lkb		ls_local_lkb;	/* for returning errors */
> -	struct dlm_message	ls_local_ms;	/* for faking a reply */
>   
>   	struct dentry		*ls_debug_rsb_dentry; /* debugfs */
>   	struct dentry		*ls_debug_waiters_dentry; /* debugfs */
> @@ -665,6 +664,9 @@ struct dlm_ls {
>   
>   	int			ls_namelen;
>   	char			ls_name[DLM_LOCKSPACE_LEN + 1];
> +
> +	/* Must be last --ends in a flexible-array member.*/
> +	struct dlm_message	ls_local_ms;	/* for faking a reply */
>   };
>   
>   /*


  reply	other threads:[~2026-01-30 21:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22 14:20 [PATCH][next] dlm: Avoid -Wflex-array-member-not-at-end warning Gustavo A. R. Silva
2026-01-30  6:40 ` Gustavo A. R. Silva [this message]
2026-01-31  1:17   ` Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d712992-e006-4787-95ee-e82cfa25f8ff@embeddedor.com \
    --to=gustavo@embeddedor.com \
    --cc=aahringo@redhat.com \
    --cc=gfs2@lists.linux.dev \
    --cc=gustavoars@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=teigland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.