From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (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 657ED223DC0 for ; Sat, 16 Aug 2025 07:30:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755329442; cv=none; b=XUV+DosUYgFZZS8F42bpCVf5Cor3a9Hh+cwER6aNaeNDjT2i8vmi4e69GqZdPg9MN1bzrDmlB475770yKNsRNr9NOJKcaX7ygJCiRkFjhfmdmFjIFSBO7iI/lnA/s5s8bs6HgTLEHkhrOwc+8bw4Q93En2W49ZHpHhBM1PQeqBo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755329442; c=relaxed/simple; bh=i5ssAXv0QmdSaZC7DTfY9ZarpbikiIO5JuEr7iyRhLs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZWTBLY4pzywCJFgUn6EhgjPcUsMH2tjv0YKDjDnU7dxxfura6G8Jmf4bfTmYazBFIy8e9e6jpA29BZKwCL3+AgSPswyNXkTY/R7O02E6uh0cHE07SrMHnIqOaaORZU2keW/T5XLF/D8nxtbikSOkQWQ/GtYMPGue4qLPLnjNiEU= 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=GytX8O7Z; arc=none smtp.client-ip=91.218.175.178 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="GytX8O7Z" 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250815161406.76370-2-apatel@ventanamicro.com> X-Migadu-Flow: FLOW_OUT 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