From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jacob Pan Subject: Re: [PATCH] powercap/intel_rapl: fix and tidy up error handling Date: Mon, 28 Nov 2016 09:31:03 -0800 Message-ID: <20161128093103.3cb4041c@jacob-builder> References: <1479927666-563-1-git-send-email-jacob.jun.pan@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com ([134.134.136.65]:23220 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750799AbcK1R3D (ORCPT ); Mon, 28 Nov 2016 12:29:03 -0500 In-Reply-To: Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: "Rafael J. Wysocki" Cc: LKML , Linux PM , Rafael Wysocki , Marcin Koss , Lukasz Odzioba , Thomas Gleixner , Sebastian Andrzej Siewior , jacob.jun.pan@linux.intel.com On Thu, 24 Nov 2016 22:06:59 +0100 "Rafael J. Wysocki" wrote: > On Wed, Nov 23, 2016 at 8:01 PM, Jacob Pan > wrote: > > Commit e1399ba20eee ("powercap / RAPL: handle missing MSRs") added > > contraint_to_pl() function to return index into an array. But it > > can potentially return -EINVAL if powercap layer sends an out of > > range constraint ID. This patch adds sanity check. > > > > Unnecessary RAPL domain pointer check is removed since it must be > > initialized before calling rapl_unit_xlate(). > > > > Reported-by: Odzioba, Lukasz > > Reported-by: Koss, Marcin > > Does this depend on the Thomas' series only? > yes, it is on top of Thomas' series. > Also, it looks like a Fixes: tag should be present here. > OK. will add that. > > > > Signed-off-by: Jacob Pan > > Thanks, > Rafael [Jacob Pan]