[PATCH 1/6] powerpc/eeh: Refactor EEH flag accessors

Gavin Shan gwshan at linux.vnet.ibm.com
Wed Jul 16 22:10:43 EST 2014

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:


>>   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.


>	David

More information about the Linuxppc-dev mailing list