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 796C9A0C41; Wed, 23 Jun 2021 11:00:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE0254003F; Wed, 23 Jun 2021 11:00:36 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 713634003E for ; Wed, 23 Jun 2021 11:00:35 +0200 (CEST) IronPort-SDR: SoRstWGZiQLMoeuVCWmJaKv/YuchSeuaw5fOPmgbDzDrF+UtyxG0OGuHJT5K9XXytkGj6vz4yg 5X7TCG3Sn5LA== X-IronPort-AV: E=McAfee;i="6200,9189,10023"; a="205397001" X-IronPort-AV: E=Sophos;i="5.83,293,1616482800"; d="scan'208";a="205397001" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2021 02:00:34 -0700 IronPort-SDR: ip6hR6uCcSuX/0NeJWxQbHn8B7G0nqQRjfz21OSWaPTxpqumjVY0FOvMhkMLEZjo+InXvbV0UF uAX9Kj0TGbFw== X-IronPort-AV: E=Sophos;i="5.83,293,1616482800"; d="scan'208";a="474071459" Received: from dhunt5-mobl5.ger.corp.intel.com (HELO [10.252.18.52]) ([10.252.18.52]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2021 02:00:33 -0700 To: Richael Zhuang , "dev@dpdk.org" Cc: "anatoly.burakov@intel.com" , "stephen@networkplumber.org" , Reshma Pattan , nd References: <20210622125853.2798-1-david.hunt@intel.com> <20210622125853.2798-2-david.hunt@intel.com> From: David Hunt Message-ID: <4895a7a2-997d-bb2d-37d8-6bc29140c5f9@intel.com> Date: Wed, 23 Jun 2021 10:00:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [dpdk-dev] [PATCH v5 2/2] power: refactor pstate and acpi code 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 23/6/2021 9:54 AM, Richael Zhuang wrote: > Hi, > There is a bug in lib/power/power_common.c: > +write_core_sysfs_s(FILE *f, const char *str) > +{ > + int ret; > + > + ret = fseek(f, 0, SEEK_SET); > + if (ret != 0) > + return -1; > + > + ret = fputs(str, f); > + if (ret != 0) > + return -1; > Here, I mentioned in the V4 patch: ret >=0 if success, EOF means failure. It seems you forgot to fix this. Ah, OK. Will fix in v6. Hopefully I'll reply to the correct email-id this time. :) > + > + /* flush the output */ > + ret = fflush(f); > + if (ret != 0) > + return -1; > + > + return 0; > +} > > Best regards, > Richael >> -----Original Message----- >> From: David Hunt >> Sent: Tuesday, June 22, 2021 9:28 PM >> To: dev@dpdk.org >> Cc: anatoly.burakov@intel.com; stephen@networkplumber.org; Richael >> Zhuang ; Reshma Pattan >> ; nd >> Subject: Re: [PATCH v5 2/2] power: refactor pstate and acpi code >> >> Adding people to the CC list that were on v4 of this patch set, and Richael >> who raised some issues in v4. >> >> On 22/6/2021 1:58 PM, David Hunt wrote: >>> From: Anatoly Burakov >>> >>> Currently, ACPI and PSTATE modes have lots of code duplication, >>> confusing logic, and a bunch of other issues that can, and have, led >>> to various bugs and resource leaks. >>> >>> This commit factors out the common parts of sysfs reading/writing for >>> ACPI and PSTATE drivers. >>> >>> Signed-off-by: Anatoly Burakov >>> Signed-off-by: David Hunt >>> >>> --- >>> changes in v2 (should read v5) >>> * fixed bugs raised by Richael Zhuang in review - open file rw+, etc. >>> * removed FOPS* and FOPEN* macros, which contained control statements. >>> * fixed some checkpatch warnings. >> >> So in the process of posting v5, I picked the email id from v4 in patchwork, >> used that in my --in-reply-to, and somehow it screwed up the threading as it >> looks like I'm responding to v3. So I'm sending this email to make sure all the >> people CC'd in v4 are included in this (v5). >> >> Anatoly is busy at the moment, so I'm addressing the issues raised in v4, and >> additionally adressing the checkpatch issues where it does not like the >> macros with control statements, so removing those, as I don't like them >> either. >> >> Regards, >> Dave. >> >> >>