From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Thu, 22 Oct 2015 19:52:59 +0000 Subject: [patch] ACPI/CPPC: signedness bug in register_pcc_channel() Message-Id: <20151022195259.GC24439@mwanda> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: "Rafael J. Wysocki" , Ashwin Chaugule Cc: Len Brown , linux-acpi@vger.kernel.org, kernel-janitors@vger.kernel.org The "pcc_subspace_idx" is -1 if it hasn't been initialized yet. We need it to be signed. Fixes: 337aadff8e45 ('ACPI: Introduce CPU performance controls using CPPC') Signed-off-by: Dan Carpenter diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index 0bbf84b..2ed5516 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -302,7 +302,7 @@ err_ret: } EXPORT_SYMBOL_GPL(acpi_get_psd_map); -static int register_pcc_channel(unsigned pcc_subspace_idx) +static int register_pcc_channel(int pcc_subspace_idx) { struct acpi_pcct_subspace *cppc_ss; unsigned int len; From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: [patch] ACPI/CPPC: signedness bug in register_pcc_channel() Date: Thu, 22 Oct 2015 22:52:59 +0300 Message-ID: <20151022195259.GC24439@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:43407 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758078AbbJVTxL (ORCPT ); Thu, 22 Oct 2015 15:53:11 -0400 Content-Disposition: inline Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "Rafael J. Wysocki" , Ashwin Chaugule Cc: Len Brown , linux-acpi@vger.kernel.org, kernel-janitors@vger.kernel.org The "pcc_subspace_idx" is -1 if it hasn't been initialized yet. We need it to be signed. Fixes: 337aadff8e45 ('ACPI: Introduce CPU performance controls using CPPC') Signed-off-by: Dan Carpenter diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index 0bbf84b..2ed5516 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -302,7 +302,7 @@ err_ret: } EXPORT_SYMBOL_GPL(acpi_get_psd_map); -static int register_pcc_channel(unsigned pcc_subspace_idx) +static int register_pcc_channel(int pcc_subspace_idx) { struct acpi_pcct_subspace *cppc_ss; unsigned int len;