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 A5BE6A0548; Fri, 2 Apr 2021 11:35:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 886BA140ED1; Fri, 2 Apr 2021 11:35:37 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id ECC8B40141 for ; Fri, 2 Apr 2021 11:35:35 +0200 (CEST) IronPort-SDR: 9PAcYp/vKVq9Ja40TI9PvjJ0jG3N6kAF5WYrEz2ISgo6MffW325S7oeeSVgExJUvWyVtpfKGn9 CjyXHChjSDkw== X-IronPort-AV: E=McAfee;i="6000,8403,9941"; a="277623689" X-IronPort-AV: E=Sophos;i="5.81,299,1610438400"; d="scan'208";a="277623689" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2021 02:35:35 -0700 IronPort-SDR: uuMldf2Jcqa3VTVGsrOIfbFJYb+D6Q2yWo1XH5oEfcyRUR1sY8DorTSVQP0l2lL1nzxesQa2dy YuW0WrGvvZOA== X-IronPort-AV: E=Sophos;i="5.81,299,1610438400"; d="scan'208";a="419591444" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.214.195]) ([10.213.214.195]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2021 02:35:34 -0700 From: "Burakov, Anatoly" To: dev@dpdk.org Cc: david.hunt@intel.com References: <20210401150614.234257-1-anatoly.burakov@intel.com> <20210402092645.258257-1-anatoly.burakov@intel.com> Message-ID: <352a7fee-9373-67a7-4dea-3b133171044c@intel.com> Date: Fri, 2 Apr 2021 10:35:32 +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: <20210402092645.258257-1-anatoly.burakov@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 1/2] power: fix pstate base frequency 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 10:26 AM, Anatoly Burakov wrote: > Previous fix for base frequency handling in pstate mode introduced a > couple of issues: > > - When base_frequency file does not exist, it simply bails out because > of what appears to be accidental addition of FOPEN_OR_ERR_RET. This is > incorrect, as absence of this file is not fatal and is in fact > expected on kernel versions earlier than 5.3 > - When base_frequency file does exist, it gets opened, but never gets > closed, resulting in a resource leak > > Both issues also manifest themselves as Coverity defects (dead code, and > a resource leak), so this fix addresses both. > > Fixes: 4db9587bbf72 ("power: check sysfs base frequency") > Cc: david.hunt@intel.com > > Coverity issue: 369693 > Coverity issue: 369694 > Bugzilla ID: 668 > > Signed-off-by: Anatoly Burakov > --- For some reason git notes got lost on format-patch. v3: - Split refactor from bugfixes v4: - v3 was erroneously "fixing" handling of base max rather than base frequency -- Thanks, Anatoly