From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 94B31A034F; Tue, 6 Apr 2021 12:06:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7A88B14105D; Tue, 6 Apr 2021 12:06:17 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 2A4F3140F88 for ; Tue, 6 Apr 2021 12:06:16 +0200 (CEST) IronPort-SDR: m962q/lGkwHtDw59/ZX7kRB+saiepQyXhvdmIhtE5krhiNxe/wfa3yelRbPwnyj+ooEnw0IqID AFlupLNY7ipQ== X-IronPort-AV: E=McAfee;i="6000,8403,9945"; a="278292997" X-IronPort-AV: E=Sophos;i="5.81,309,1610438400"; d="scan'208";a="278292997" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2021 03:06:15 -0700 IronPort-SDR: ON6yn4CdTkdqp++E0eALIZsQfucF8Knv4dtG3vRFrQFpPHpIzcAjyboQ+tpl/oIl7jaiJnhAze AgHFQUJ75NRQ== X-IronPort-AV: E=Sophos;i="5.81,309,1610438400"; d="scan'208";a="414707574" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.250.60]) ([10.213.250.60]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2021 03:06:14 -0700 To: Stephen Hemminger Cc: dev@dpdk.org References: <20210401150517.234085-1-anatoly.burakov@intel.com> <20210402104504.166aa8da@hermes.local> From: "Burakov, Anatoly" Message-ID: <64acfa0f-8047-07ad-ee3d-6c59afcf5bcb@intel.com> Date: Tue, 6 Apr 2021 11:06:13 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210402104504.166aa8da@hermes.local> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 21.08] power: refactor pstate sysfs handling X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 02-Apr-21 6:45 PM, Stephen Hemminger wrote: > On Thu, 1 Apr 2021 15:05:17 +0000 > Anatoly Burakov 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