From: Lucas De Marchi <lucas.de.marchi@gmail.com>
To: Jan Engelhardt <jengelh@inai.de>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
linux-modules <linux-modules@vger.kernel.org>,
Jan Engelhardt <jengelh@inai.de>
Subject: Re: [PATCH] libkmod: drop _PAD enum constants
Date: Wed, 18 Jul 2018 11:46:16 -0700 [thread overview]
Message-ID: <CAKi4VAJebEif94k6Zf9NR043HgkaqaEnD74ybXm5JFTu7uFSfA@mail.gmail.com> (raw)
In-Reply-To: <20180718084340.4305-1-jengelh@inai.de>
On Wed, Jul 18, 2018 at 1:44 AM Jan Engelhardt <jengelh@inai.de> wrote:
>
> When are enums ever mapped to something smaller than int, other than
> willful packing into a bitfield?
When users do bad things like passing a flag to the compiler
instructing it to do so: -fshort-enums.
That was the reason to add it back several years ago and I'd rather
not break that user now whoever it was,
although I don't think I would care adding it now if it was requested.
Lucas De Marchi
> ---
> libkmod/libkmod.h | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/libkmod/libkmod.h b/libkmod/libkmod.h
> index 352627e..4fb5ba8 100644
> --- a/libkmod/libkmod.h
> +++ b/libkmod/libkmod.h
> @@ -71,8 +71,6 @@ enum kmod_index {
> KMOD_INDEX_MODULES_ALIAS,
> KMOD_INDEX_MODULES_SYMBOL,
> KMOD_INDEX_MODULES_BUILTIN,
> - /* Padding to make sure enum is not mapped to char */
> - _KMOD_INDEX_PAD = 1U << 31,
> };
> int kmod_dump_index(struct kmod_ctx *ctx, enum kmod_index type, int fd);
>
> @@ -210,8 +208,6 @@ enum kmod_module_initstate {
> KMOD_MODULE_LIVE,
> KMOD_MODULE_COMING,
> KMOD_MODULE_GOING,
> - /* Padding to make sure enum is not mapped to char */
> - _KMOD_MODULE_PAD = 1U << 31,
> };
> const char *kmod_module_initstate_str(enum kmod_module_initstate state);
> int kmod_module_get_initstate(const struct kmod_module *mod);
> --
> 2.18.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-modules" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Lucas De Marchi
prev parent reply other threads:[~2018-07-18 18:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 8:43 [PATCH] libkmod: drop _PAD enum constants Jan Engelhardt
2018-07-18 18:46 ` Lucas De Marchi [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=CAKi4VAJebEif94k6Zf9NR043HgkaqaEnD74ybXm5JFTu7uFSfA@mail.gmail.com \
--to=lucas.de.marchi@gmail.com \
--cc=jengelh@inai.de \
--cc=linux-modules@vger.kernel.org \
--cc=lucas.demarchi@intel.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 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 NNTP newsgroup(s).