[SLOF] [PATCH v2 01/20] Add a TPM driver implementation
Stefan Berger
stefanb at linux.vnet.ibm.com
Thu Nov 19 22:59:17 AEDT 2015
On 11/19/2015 12:09 AM, Alexey Kardashevskiy wrote:
> On 11/19/2015 12:07 AM, Thomas Huth wrote:
>> On 17/11/15 18:02, Stefan Berger wrote:
>
>>> +/* check for error state */
>>> +#define SPAPR_CHECK_FAILURE_MODE \
>>> + if (vtpm_drv_error_get() != VTPM_DRV_ERROR_NO_FAILURE) { \
>>> + printf("VTPM CRQ: In failure mode\n"); \
>>> + return false; \
>>> + }
>>
>> Hiding "return" statements in macros is IMHO a very bad style - you
>> later don't see the function flow anymore, you can not "grep" for
>> "return" statements in the code, etc. So I'd vote for not using such
>> macros (but I leave the decision to the maintainers of course whether
>> they accept such code or not).
>
> +1
Fixed.
Stefan
More information about the SLOF
mailing list