From: Denis Kenzior <denkenz@gmail.com>
To: ell@lists.linux.dev
Subject: Re: [PATCH v2 1/4] util: Remove confusing static keyword use
Date: Tue, 16 Apr 2024 14:07:22 -0500 [thread overview]
Message-ID: <ed309815-edb1-4c7d-b7b1-b04980522be2@gmail.com> (raw)
In-Reply-To: <20240416142458.3353383-1-denkenz@gmail.com>
On 4/16/24 09:24, Denis Kenzior wrote:
> '__n' is declared as static const which is confusing since it
> would imply that __n is only initialized once. This works out in the
> end since the macro used in a separate anonymous block, but some compilers
> (i.e. clang) will generate a symbol table entry for '__n'. This is not
> needed since the expression is always constant.
>
> Declare '__n' as a const size_t instead since that is the type produced
> by the sizeof() operation used by L_ARRAY_SIZE.
>
> While here, also declare '__i' as size_t to match '__n'.
>
> Fixes: 4a9f6388dd7f ("util: Add L_IN_SET macros")
> ---
> ell/util.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Applied.
prev parent reply other threads:[~2024-04-16 19:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-16 14:24 [PATCH v2 1/4] util: Remove confusing static keyword use Denis Kenzior
2024-04-16 14:24 ` [PATCH v2 2/4] util: Add L_BIT_{SET|CLEAR|TEST} macros Denis Kenzior
2024-04-16 14:24 ` [PATCH v2 3/4] util: Add L_BITS_{SET|CLEAR} Denis Kenzior
2024-04-16 14:24 ` [PATCH v2 4/4] unit: Add tests for the new bitmap utilities Denis Kenzior
2024-04-16 19:07 ` Denis Kenzior [this message]
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=ed309815-edb1-4c7d-b7b1-b04980522be2@gmail.com \
--to=denkenz@gmail.com \
--cc=ell@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).