From: "David E. Box" <david.e.box@linux.intel.com>
To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] platform/x86/intel/pmc: Remove unnecessary ioremap
Date: Fri, 18 Oct 2024 07:36:29 -0700 [thread overview]
Message-ID: <9d72833eb5d89f5f88cb3d40a909411eabba0e2a.camel@linux.intel.com> (raw)
In-Reply-To: <20241018030357.3580487-2-david.e.box@linux.intel.com>
On Thu, 2024-10-17 at 20:03 -0700, David E. Box wrote:
> pmc_get_pmc() unnecessarily calls ioremap to access memory that is already
> available through a variable passed in as an argument. Replace the
> redundant ioremap call with direct use of the provided variable, and remove
> the ioremap and iounmap calls.
Woke up to a test failure on this one. I'll drop in V2 or modify after checking
what I missed.
David
>
> Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> ---
> drivers/platform/x86/intel/pmc/core_ssram.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/platform/x86/intel/pmc/core_ssram.c
> b/drivers/platform/x86/intel/pmc/core_ssram.c
> index 70e03bd53740..d293e6e166e1 100644
> --- a/drivers/platform/x86/intel/pmc/core_ssram.c
> +++ b/drivers/platform/x86/intel/pmc/core_ssram.c
> @@ -171,13 +171,7 @@ pmc_add_pmt(struct pmc_dev *pmcdev, u64 ssram_base, void
> __iomem *ssram)
> u32 dvsec_offset;
> u32 table, hdr;
>
> - ssram = ioremap(ssram_base, SSRAM_HDR_SIZE);
> - if (!ssram)
> - return;
> -
> dvsec_offset = readl(ssram + SSRAM_DVSEC_OFFSET);
> - iounmap(ssram);
> -
> dvsec = ioremap(ssram_base + dvsec_offset, SSRAM_DVSEC_SIZE);
> if (!dvsec)
> return;
prev parent reply other threads:[~2024-10-18 14:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 3:03 [PATCH 1/2] platform/x86/intel/pmc: Fix ioremap of bad address David E. Box
2024-10-18 3:03 ` [PATCH 2/2] platform/x86/intel/pmc: Remove unnecessary ioremap David E. Box
2024-10-18 14:36 ` David E. Box [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9d72833eb5d89f5f88cb3d40a909411eabba0e2a.camel@linux.intel.com \
--to=david.e.box@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®