From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH v2 2/3] pci: use anonymous 'enum' instead of 'enum pci_channel_state'
Date: Thu, 2 Jul 2020 18:26:50 +0200 [thread overview]
Message-ID: <20200702162651.49526-3-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20200702162651.49526-1-luc.vanoostenryck@gmail.com>
For typechecking reasons, the typedef 'pci_channel_state_t'
should be used instead of the 'enum pci_channel_state'.
One simple way to enforce this is to remove the definition of
'enum pci_channel_state' and replace it by an anonymous 'enum'.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
include/linux/pci.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 7ee85e89e8ed..adcee9e30bfa 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -179,7 +179,7 @@ static inline const char *pci_power_name(pci_power_t state)
*/
typedef unsigned int __bitwise pci_channel_state_t;
-enum pci_channel_state {
+enum {
/* I/O channel is in normal state */
pci_channel_io_normal = (__force pci_channel_state_t) 1,
--
2.27.0
next prev parent reply other threads:[~2020-07-02 16:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 16:26 [PATCH v2 0/3] pci: enforce usage of 'pci_channel_state_t' Luc Van Oostenryck
2020-07-02 16:26 ` [PATCH v2 1/3] pci: use 'pci_channel_state_t' instead of 'enum pci_channel_state' Luc Van Oostenryck
2020-07-02 16:26 ` Luc Van Oostenryck [this message]
2020-07-02 16:26 ` [PATCH v2 3/3] pci: update to doc to use 'pci_channel_state_t' Luc Van Oostenryck
2020-07-07 22:17 ` [PATCH v2 0/3] pci: enforce usage of 'pci_channel_state_t' Bjorn Helgaas
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=20200702162651.49526-3-luc.vanoostenryck@gmail.com \
--to=luc.vanoostenryck@gmail.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/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