From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E070B272E75 for ; Mon, 18 Aug 2025 19:26:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755545194; cv=none; b=spLvqiWu6w5T3cbwPGa7iASB9kzuL20KCqSCtZi+6zC2VhyH11/oBOeuprruPYoyhPCKBUpf18/DAkQQqZsmUNymlBt1cvk5x87VoXt1WS+tAZF/VpeNii0KKS4dcBxyVcN5WtFXXOer/xNE7acRC+mbY6DbSVVUasnMSL6F/wQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755545194; c=relaxed/simple; bh=N0KEz1rl1jL1PP3w97jH5JqOD9sO2N0qIXncXsx8V9o=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Na9EFLrrgWAZltKpFvcHenQfBzWPnah5n7wbYCP3ucfJCvocdTlXkFpA1tWKfMfEuib/5jzTqq2AZv/GQ9K3PVz2EKqid0Z8MqNvAJyGlgUVQoeJqyg+BZO/5FEJzyTqnD9revf/TT30V5rNVQeun6ZJC/qBWwLRfj6E4v7gpTE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=mH+VmKVX; arc=none smtp.client-ip=91.218.175.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="mH+VmKVX" Message-ID: <2a7e2450-5e31-40d6-bca4-ccc2c1d60b72@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1755545179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q3UWG4FunCCbQLj+biR4a06QSU33PixM4sYuMp155u4=; b=mH+VmKVX5OvdeT8AcQ2d9iNMPDRxQosoUJQ+Ob0OavqixnlEqb9GHwVlnTZnHxlnGMpvQU OjkW/hosFEVjhKBL5FeQZXzERh9v0nZkwj9jqgbhKaFqNQpWUHm1XliM1mdeQ4VKL4/98u OJWUdliYOG5PWDHcW4mIwyiL/5PnkNc= Date: Mon, 18 Aug 2025 12:26:13 -0700 Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2 1/2] ACPI: RISC-V: Fix FFH_CPPC_CSR error handling To: Anup Patel , Sunil V L , "Rafael J . Wysocki" Cc: Palmer Dabbelt , Paul Walmsley , Alexandre Ghiti , Len Brown , Andrew Jones , Anup Patel , Will Deacon , Mark Rutland , linux-acpi@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Troy Mitchell References: <20250818143600.894385-1-apatel@ventanamicro.com> <20250818143600.894385-2-apatel@ventanamicro.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Atish Patra Content-Language: en-US In-Reply-To: <20250818143600.894385-2-apatel@ventanamicro.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 8/18/25 7:35 AM, Anup Patel wrote: > The cppc_ffh_csr_read() and cppc_ffh_csr_write() returns Linux error > code in "data->ret.error" so cpc_read_ffh() and cpc_write_ffh() must > not use sbi_err_map_linux_errno() for FFH_CPPC_CSR. > > Fixes: 30f3ffbee86b ("ACPI: RISC-V: Add CPPC driver") > Signed-off-by: Anup Patel > Reviewed-by: Andrew Jones > Reviewed-by: Troy Mitchell > --- > drivers/acpi/riscv/cppc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/acpi/riscv/cppc.c b/drivers/acpi/riscv/cppc.c > index 440cf9fb91aa..42c1a9052470 100644 > --- a/drivers/acpi/riscv/cppc.c > +++ b/drivers/acpi/riscv/cppc.c > @@ -119,7 +119,7 @@ int cpc_read_ffh(int cpu, struct cpc_reg *reg, u64 *val) > > *val = data.ret.value; > > - return (data.ret.error) ? sbi_err_map_linux_errno(data.ret.error) : 0; > + return data.ret.error; > } > > return -EINVAL; > @@ -148,7 +148,7 @@ int cpc_write_ffh(int cpu, struct cpc_reg *reg, u64 val) > > smp_call_function_single(cpu, cppc_ffh_csr_write, &data, 1); > > - return (data.ret.error) ? sbi_err_map_linux_errno(data.ret.error) : 0; > + return data.ret.error; > } > > return -EINVAL; Reviewed-by: Atish Patra