From patchwork Mon Feb 10 19:40:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kammela, Gayatri" X-Patchwork-Id: 11374039 X-Patchwork-Delegate: andy.shevchenko@gmail.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A4A7D92A for ; Mon, 10 Feb 2020 19:44:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 85BF120715 for ; Mon, 10 Feb 2020 19:44:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727056AbgBJTos (ORCPT ); Mon, 10 Feb 2020 14:44:48 -0500 Received: from mga17.intel.com ([192.55.52.151]:63657 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727003AbgBJTos (ORCPT ); Mon, 10 Feb 2020 14:44:48 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2020 11:44:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,426,1574150400"; d="scan'208";a="405689163" Received: from gayuk-dev-mach.sc.intel.com ([10.3.79.171]) by orsmga005.jf.intel.com with ESMTP; 10 Feb 2020 11:44:46 -0800 From: Gayatri Kammela To: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org, vishwanath.somayaji@intel.com, dvhart@infradead.org, mika.westerberg@intel.com, peterz@infradead.org, charles.d.prestopine@intel.com, Gayatri Kammela , Srinivas Pandruvada , "David E . Box" , Andy Shevchenko Subject: [PATCH v1] platform/x86: intel_pmc_core: Bug: Fix the order of the parameters passed to pmc_core_lpm_display() Date: Mon, 10 Feb 2020 11:40:38 -0800 Message-Id: X-Mailer: git-send-email 2.17.1 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org The parameters passed to pmc_core_lpm_display() which is called by pmc_core_resume() are not in the right order and hence will not dump the low power status registers on an S0ix.y failure even if it is compiled (with warnings). Fix the bug by passing the parameters in right order. Cc: Srinivas Pandruvada Cc: David E. Box Cc: Andy Shevchenko Signed-off-by: Gayatri Kammela --- Hi Andy, The reason for not catching this bug earlier was not passing the "-Werror" flag while compiling. I apologize for overlooking the warnings. I wanted to send v3 of the series, but I have noticed the patch series has been merged in to for-next branch. I have made sure, no warnings or errors are seen before sending this fix. drivers/platform/x86/intel_pmc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c index 753d51087838..f4a36fbabf4c 100644 --- a/drivers/platform/x86/intel_pmc_core.c +++ b/drivers/platform/x86/intel_pmc_core.c @@ -1326,7 +1326,7 @@ static int pmc_core_resume(struct device *dev) if (pmcdev->map->slps0_dbg_maps) pmc_core_slps0_display(pmcdev, dev, NULL); if (pmcdev->map->lpm_sts) - pmc_core_lpm_display(pmcdev, dev, NULL, "STATUS", offset, maps); + pmc_core_lpm_display(pmcdev, dev, NULL, offset, "STATUS", maps); return 0; }