linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: David Laight <David.Laight@aculab.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	'Gavin Shan' <gwshan@linux.vnet.ibm.com>
Subject: Re: [PATCH 1/6] powerpc/eeh: Refactor EEH flag accessors
Date: Wed, 16 Jul 2014 22:10:43 +1000	[thread overview]
Message-ID: <20140716121043.GA5313@shangw> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1727472B@AcuExch.aculab.com>

On Wed, Jul 16, 2014 at 08:24:49AM +0000, David Laight wrote:
>From: Gavin Shan
>> There are multiple global EEH flags. Almost each flag has its own
>> accessor, which doesn't make sense. The patch refactors EEH flag
>> accessors so that they look unified:
>> 
>>   eeh_add_flag():   Add EEH flag
>
>eeh_set_flag() ??
>

I guess it's reasonable to keep eeh_add_flag(). eeh_set_flag() overwrites
the flags we had. I steal them from include/asm-generic/pci-bridge.h:

pci_set_flag()
pci_add_flag()
pci_clear_flag()

>>   eeh_clear_flag(): Clear EEH flag
>>   eeh_has_flag():   Check if one specific flag has been set
>
>Personally I find these sort of 'accessor' functions rather pointless.
>

Indeed, but it makes the code a bit clean. I needn't access
the global variable for flags directly.

Thanks,
Gavin

>	David
>

  reply	other threads:[~2014-07-16 12:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16  5:50 [PATCH 0/6] EEH Cleanup Gavin Shan
2014-07-16  5:50 ` [PATCH 1/6] powerpc/eeh: Refactor EEH flag accessors Gavin Shan
2014-07-16  8:24   ` David Laight
2014-07-16 12:10     ` Gavin Shan [this message]
2014-07-16  5:50 ` [PATCH 2/6] powerpc/eeh: Selectively enable IO for error log Gavin Shan
2014-07-16  5:50 ` [PATCH 3/6] powerpc/eeh: Reduce lines of log dump Gavin Shan
2014-07-16  8:30   ` David Laight
2014-07-16 12:26     ` Gavin Shan
2014-07-16  5:50 ` [PATCH 4/6] powerpc/eeh: Replace pr_warning() with pr_warn() Gavin Shan
2014-07-16  5:50 ` [PATCH 5/6] powerpc/eeh: Make diag-data not endian dependent Gavin Shan
2014-07-16  5:50 ` [PATCH 6/6] powerpc/eeh: Aux PE data for error log 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=20140716121043.GA5313@shangw \
    --to=gwshan@linux.vnet.ibm.com \
    --cc=David.Laight@aculab.com \
    --cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).