From: Al Viro <viro@zeniv.linux.org.uk>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH][next] fs: hpfs: Avoid multiple -Wflex-array-member-not-at-end warnings
Date: Wed, 5 Feb 2025 13:03:08 +0000 [thread overview]
Message-ID: <20250205130308.GC1977892@ZenIV> (raw)
In-Reply-To: <Z6GM6WIg8f0Ql30E@kspp>
On Tue, Feb 04, 2025 at 02:13:37PM +1030, Gustavo A. R. Silva wrote:
> +#define anode_btree container_of(&anode->btree, struct bplus_header, __hdr)
> +#define ranode_btree container_of(&ranode->btree, struct bplus_header, __hdr)
> +#define fnode_btree container_of(&fnode->btree, struct bplus_header, __hdr)
> +
> /* Find a sector in allocation tree */
>
> secno hpfs_bplus_lookup(struct super_block *s, struct inode *inode,
> @@ -27,7 +31,7 @@ secno hpfs_bplus_lookup(struct super_block *s, struct inode *inode,
> a = le32_to_cpu(btree->u.internal[i].down);
> brelse(bh);
> if (!(anode = hpfs_map_anode(s, a, &bh))) return -1;
> - btree = &anode->btree;
> + btree = anode_btree;
Just for this - NAK. And then you proceed to add dozens more of the same.
If it looks like a variable name, it must not turn out to be a bloody macro;
if a macro expansion depends upon a local variable with given name existing
in scope of its use, make that name an explicit argument. You manage to
violate both.
next prev parent reply other threads:[~2025-02-05 13:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 3:43 [PATCH][next] fs: hpfs: Avoid multiple -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
2025-02-05 13:03 ` Al Viro [this message]
2025-02-06 1:21 ` Gustavo A. R. Silva
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=20250205130308.GC1977892@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=gustavoars@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikulas@artax.karlin.mff.cuni.cz \
/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.