From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE9DCCA0EE6 for ; Sat, 16 Aug 2025 07:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rmKQqNXUDveDz9QCv6Bol7mKOu4+X1q12BjCd170jRg=; b=o9AkXPv3Mregoz Xw7ApDOXV7My+AU6u5n7KdEEQjsgJgrjZIIHHA9A1e8syY7zK4PL4l4uQP4096OlaH5mk/PD9z1he OFlGoxS8gEge8yEcLcgCTKLP9X//h7BKt6Sgu2lrE+mPoJCKmlZgKGRWKIrIitp79ahmCWT70lGgv nL/Sc42SWewajH9ecb0yrjn3sqHHb4gBhfX32l5tcNPnfsNSZNazMDxxyU6LIuIq/j3tXhBj8/8rZ eL2aDxFQ43SuboE4lNMSeMNmFL/mmQgr/0WBwDh0x3OvBVc928smALDO5tNau4K4ycGMfKiPOvtPh Y823YlT9b4y8BKpO0yLQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1unBQM-00000004DmR-0wE9; Sat, 16 Aug 2025 07:33:58 +0000 Received: from out-182.mta0.migadu.com ([91.218.175.182]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1unBNB-00000004DTI-2dTb for linux-riscv@lists.infradead.org; Sat, 16 Aug 2025 07:30:43 +0000 Date: Sat, 16 Aug 2025 15:30:14 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1755329427; 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: in-reply-to:in-reply-to:references:references; bh=VrtQfsqunoMUAgJ9HLaz9rRre5ttd6HWa6pPbNixffA=; b=GytX8O7ZMvMgzlcKTYRi7/4RWi/vtIOmu0EqcFqGnCSgetACzbUYNmff9ftOjvDflrsnWP ugPkOXm0MdNmesJpFMxbW2sV82NwmGDRe6+HWNj3UXzWJ4kI5Y2azMDN/GpJcgtUW3ZWR0 VxSm/8mYunsgnCD92SdK3z47VJDA890= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Troy Mitchell To: Anup Patel , Sunil V L , "Rafael J . Wysocki" Cc: Palmer Dabbelt , Paul Walmsley , Alexandre Ghiti , Len Brown , Atish Patra , 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 Subject: Re: [PATCH 1/2] ACPI: RISC-V: Fix FFH_CPPC_CSR error handling Message-ID: References: <20250815161406.76370-1-apatel@ventanamicro.com> <20250815161406.76370-2-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250815161406.76370-2-apatel@ventanamicro.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250816_003042_511697_FEE65EFA X-CRM114-Status: GOOD ( 15.33 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Fri, Aug 15, 2025 at 09:44:05PM +0530, 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 > --- > 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; > Thanks! Reviewed-by: Troy Mitchell > -- > 2.43.0 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv