From: "David Laight" <David.Laight@ACULAB.COM>
To: "Gavin Shan" <shangw@linux.vnet.ibm.com>,
<linuxppc-dev@lists.ozlabs.org>
Subject: RE: [PATCH 3/6] powerpc/powernv: Replace variables with flags
Date: Wed, 26 Jun 2013 10:12:16 +0100 [thread overview]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6026B72A6@saturn3.aculab.com> (raw)
In-Reply-To: <1372210688-12214-4-git-send-email-shangw@linux.vnet.ibm.com>
> We have 2 fields in "struct pnv_phb" to trace the states. The patch
> replace the fields with one and introduces flags for that. The patch
> doesn't impact the logic.
What is the benefit of this change?
...
> +
> +#define PNV_EEH_STATE_ENABLED (1 << 0) /* EEH enabled */
> +#define PNV_EEH_STATE_REMOVED (1 << 1) /* PHB removed */
> +
> #endif /* CONFIG_EEH */
>=20
> struct pnv_phb {
> @@ -92,8 +96,7 @@ struct pnv_phb {
>=20
> #ifdef CONFIG_EEH
> struct pnv_eeh_ops *eeh_ops;
> - int eeh_enabled;
> - int removed;
> + int eeh_state;
> #endif
>=20
> #ifdef CONFIG_DEBUG_FS
All I can see is that it possibly reduces a structure by 4 bytes
while adding extra code.
(On 64 bit systems there might be a 4 byte pad added.)
David
next prev parent reply other threads:[~2013-06-26 9:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 1:38 [PATCH v3 00/6] Follow-up fixes for EEH on PowerNV Gavin Shan
2013-06-26 1:38 ` [PATCH 1/6] powerpc/eeh: Don't collect PCI-CFG data on PHB Gavin Shan
2013-06-26 1:38 ` [PATCH 2/6] powerpc/eeh: Check PCIe link after reset Gavin Shan
2013-06-26 1:38 ` [PATCH 3/6] powerpc/powernv: Replace variables with flags Gavin Shan
2013-06-26 9:12 ` David Laight [this message]
2013-06-26 10:08 ` Gavin Shan
2013-06-26 1:38 ` [PATCH 4/6] powerpc/eeh: Fix address catch for PowerNV Gavin Shan
2013-06-26 1:38 ` [PATCH 5/6] powerpc/eeh: Refactor the output message Gavin Shan
2013-06-26 1:38 ` [PATCH 6/6] powerpc/eeh: Avoid build warnings Gavin Shan
-- strict thread matches above, loose matches on Subject: below --
2013-06-25 10:00 [PATCH v2 00/6] Follow-up fixes for EEH on PowerNV Gavin Shan
2013-06-25 10:00 ` [PATCH 3/6] powerpc/powernv: Replace variables with flags Gavin Shan
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=AE90C24D6B3A694183C094C60CF0A2F6026B72A6@saturn3.aculab.com \
--to=david.laight@aculab.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=shangw@linux.vnet.ibm.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).