[dpdk-dev] [PATCH 21.08] power: refactor pstate sysfs handling
Burakov, Anatoly
anatoly.burakov at intel.com
Tue Apr 6 12:06:13 CEST 2021
On 02-Apr-21 6:45 PM, Stephen Hemminger wrote:
> On Thu, 1 Apr 2021 15:05:17 +0000
> Anatoly Burakov <anatoly.burakov at intel.com> wrote:
>
>>
>> +#define FOPEN_OR_ERR_GOTO(f, label) do { \
>> + if ((f) == NULL) { \
>> + RTE_LOG(ERR, POWER, "File not opened\n"); \
>> + goto label; \
>> + } \
>> +} while (0)
>> +
>
> I am not a fan of macros like this that have gotos.
> It is clearer to just open code it.
>
Well, it's keeping consistent style with the rest of the file. If we are
to remove these, ideally we should just replace usage of all of them.
--
Thanks,
Anatoly
More information about the dev
mailing list