lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b78177bf-8bb6-885f-62b4-10b783ccd49f@linux.intel.com>
Date: Mon, 9 Dec 2024 15:37:52 +0200 (EET)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Xi Pardee <xi.pardee@...ux.intel.com>
cc: rajvi0912@...il.com, irenic.rajneesh@...il.com, 
    david.e.box@...ux.intel.com, Hans de Goede <hdegoede@...hat.com>, 
    platform-driver-x86@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>, 
    linux-pm@...r.kernel.org
Subject: Re: [PATCH 1/3] platform/x86:intel/pmc: Make tgl_core_generic_init()
 static

On Fri, 6 Dec 2024, Xi Pardee wrote:

> Make tgl_core_generic_init() a static function as the function has no
> callers outside of tgl.c. Remove the prototype in core.h and reorder
> the code in tgl.c.
> 
> Signed-off-by: Xi Pardee <xi.pardee@...ux.intel.com>
> ---
>  drivers/platform/x86/intel/pmc/core.h |  1 -
>  drivers/platform/x86/intel/pmc/tgl.c  | 22 +++++++++++-----------
>  2 files changed, 11 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h
> index b9d3291d0bf2c..a1886d8e1ef3e 100644
> --- a/drivers/platform/x86/intel/pmc/core.h
> +++ b/drivers/platform/x86/intel/pmc/core.h
> @@ -597,7 +597,6 @@ int cnp_core_init(struct pmc_dev *pmcdev);
>  int icl_core_init(struct pmc_dev *pmcdev);
>  int tgl_core_init(struct pmc_dev *pmcdev);
>  int tgl_l_core_init(struct pmc_dev *pmcdev);
> -int tgl_core_generic_init(struct pmc_dev *pmcdev, int pch_tp);
>  int adl_core_init(struct pmc_dev *pmcdev);
>  int mtl_core_init(struct pmc_dev *pmcdev);
>  int arl_core_init(struct pmc_dev *pmcdev);
> diff --git a/drivers/platform/x86/intel/pmc/tgl.c b/drivers/platform/x86/intel/pmc/tgl.c
> index e0580de180773..4fec43d212d01 100644
> --- a/drivers/platform/x86/intel/pmc/tgl.c
> +++ b/drivers/platform/x86/intel/pmc/tgl.c
> @@ -285,17 +285,7 @@ void pmc_core_get_tgl_lpm_reqs(struct platform_device *pdev)
>  	ACPI_FREE(out_obj);
>  }
>  
> -int tgl_l_core_init(struct pmc_dev *pmcdev)
> -{
> -	return tgl_core_generic_init(pmcdev, PCH_LP);
> -}
> -
> -int tgl_core_init(struct pmc_dev *pmcdev)
> -{
> -	return tgl_core_generic_init(pmcdev, PCH_H);
> -}
> -
> -int tgl_core_generic_init(struct pmc_dev *pmcdev, int pch_tp)
> +static int tgl_core_generic_init(struct pmc_dev *pmcdev, int pch_tp)
>  {
>  	struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN];
>  	int ret;
> @@ -317,3 +307,13 @@ int tgl_core_generic_init(struct pmc_dev *pmcdev, int pch_tp)
>  
>  	return 0;
>  }
> +
> +int tgl_l_core_init(struct pmc_dev *pmcdev)
> +{
> +	return tgl_core_generic_init(pmcdev, PCH_LP);
> +}
> +
> +int tgl_core_init(struct pmc_dev *pmcdev)
> +{
> +	return tgl_core_generic_init(pmcdev, PCH_H);
> +}
> 

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ