From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC169156F5E; Mon, 3 Mar 2025 15:05:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741014346; cv=none; b=QM7QRwRmUop+KymQfKEg9OdvsTzYdSyvTE220DYJUhM8MwEfnZ26lZHMGQvs5AjMCg4wso+VMHkuVb5CmuxfD1zI04GpBK2S6dk4/wSkDLWEQQMwDlRybePpSmrRSnZtvlYHzclKeNXEql5L75+4Rip1mZVidQ+PNne/4Vx+YzY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741014346; c=relaxed/simple; bh=L5pWAKrCXOYUoIhvx6Wbj4qhfpX1Y/d5A9WddHMWFno=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jIExw0bsRTwcUinSaG+g+LXfgc6h1/7weVrBeJFvI2N7fCWIizb1Cy/LFguZ9HAJVinheoRM4/GALxFreM+oR5Mbwy10dCwA5FcKv05BFJI14U8l/6SBHNKz/sG6W3RG6w8S+IDiDBUOGz3hsCR1fB4NNxVUYxZ5Yn6CeQUaq5Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 29B8D106F; Mon, 3 Mar 2025 07:05:58 -0800 (PST) Received: from bogus (e133711.arm.com [10.1.196.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 831693F5A1; Mon, 3 Mar 2025 07:05:42 -0800 (PST) Date: Mon, 3 Mar 2025 15:05:39 +0000 From: Sudeep Holla To: Guenter Roeck Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Sudeep Holla , Jassi Brar , Huisong Li , Adam Young , Jean Delvare , linux-hwmon@vger.kernel.org Subject: Re: [PATCH 12/14] hwmon: (xgene-hwmon) Simplify PCC shared memory region handling Message-ID: References: <20250303-pcc_fixes_updates-v1-0-3b44f3d134b1@arm.com> <20250303-pcc_fixes_updates-v1-12-3b44f3d134b1@arm.com> Precedence: bulk X-Mailing-List: linux-acpi@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: On Mon, Mar 03, 2025 at 05:55:57AM -0800, Guenter Roeck wrote: > On 3/3/25 02:51, Sudeep Holla wrote: > > The PCC driver now handles mapping and unmapping of shared memory > > areas as part of pcc_mbox_{request,free}_channel(). Without these before, > > this xgene hwmon driver did handling of those mappings like several > > other PCC mailbox client drivers. > > > > There were redundant operations, leading to unnecessary code. Maintaining > > the consistency across these driver was harder due to scattered handling > > of shmem. > > > > Just use the mapped shmem and remove all redundant operations from this > > driver. > > > > Cc: Jean Delvare > > Cc: Guenter Roeck > > Cc: linux-hwmon@vger.kernel.org > > Signed-off-by: Sudeep Holla > > Acked-by: Guenter Roeck > > Note that I'll apply a fix this week which will cause a context conflict. > See below. > Sure, I was planning to repost these individually after the mailbox changes are merged. I am not sure if I can get some testing on this xgene platform as I am changing the mapping attributes which currently is different for different versions of firmware and both are incorrect in terms of ACPI spec. In short, no rush. The idea of posting these is to show how duplicate code can be removed. I will post it independently sometime in the future. > > This needed to be IS_ERR_OR_NULL() since devm_memremap() returns an ERR_PTR. > True. IIRC, there are few valid iomem related sparse warnings which I plan to fix and post it together once the PCC changes are merged. Thanks for the review. -- Regards, Sudeep