Re: [PATCH 2/2] platform/x86/intel/pmc: Remove unnecessary ioremap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
> ---
>  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;






[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux