From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751596AbcK1R3L (ORCPT ); Mon, 28 Nov 2016 12:29:11 -0500 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 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,564,1473145200"; d="scan'208";a="10586538" Date: Mon, 28 Nov 2016 09:31:03 -0800 From: Jacob Pan 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 Subject: Re: [PATCH] powercap/intel_rapl: fix and tidy up error handling Message-ID: <20161128093103.3cb4041c@jacob-builder> In-Reply-To: References: <1479927666-563-1-git-send-email-jacob.jun.pan@linux.intel.com> Organization: OTC X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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]