Skip to content

Commit

Permalink
[Build] Changed some inline function prototypes
Browse files Browse the repository at this point in the history
  • Loading branch information
cyring committed Feb 23, 2025
1 parent cb9fc92 commit f314201
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

COREFREQ_MAJOR = 2
COREFREQ_MINOR = 0
COREFREQ_REV = 1
COREFREQ_REV = 2
HW = $(shell uname -m)
CC ?= cc
WARNING ?= -Wall -Wfatal-errors
Expand Down
12 changes: 6 additions & 6 deletions aarch64/corefreqk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2464,7 +2464,7 @@ static void Compute_ACPI_CPPC_Bounds(unsigned int cpu)
}
}

inline signed int Disable_ACPI_CPPC(unsigned int cpu, void *arg)
static signed int Disable_ACPI_CPPC(unsigned int cpu, void *arg)
{
#if defined(CONFIG_ACPI_CPPC_LIB) \
&& LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
Expand All @@ -2483,7 +2483,7 @@ inline signed int Disable_ACPI_CPPC(unsigned int cpu, void *arg)
return rc;
}

inline signed int Enable_ACPI_CPPC(unsigned int cpu, void *arg)
static signed int Enable_ACPI_CPPC(unsigned int cpu, void *arg)
{
#if defined(CONFIG_ACPI_CPPC_LIB) \
&& LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
Expand Down Expand Up @@ -3657,15 +3657,15 @@ static void Generic_Core_Counters_Clear(union SAVE_AREA_CORE *Save,
})

#ifdef CONFIG_CPU_FREQ
inline COF_ST Compute_COF_From_CPU_Freq(struct cpufreq_policy *pFreqPolicy)
static COF_ST Compute_COF_From_CPU_Freq(struct cpufreq_policy *pFreqPolicy)
{
COF_ST ratio;
FREQ2COF(pFreqPolicy->cur, ratio);
return ratio;
}
#endif /* CONFIG_CPU_FREQ */

inline COF_ST Compute_COF_From_PMU_Counter( unsigned long long deltaCounter,
static COF_ST Compute_COF_From_PMU_Counter( unsigned long long deltaCounter,
CLOCK clk,
COF_ST lowestRatio )
{
Expand Down Expand Up @@ -5474,7 +5474,7 @@ static struct file_operations CoreFreqK_fops = {
};

#ifdef CONFIG_PM_SLEEP
inline void Print_SuspendResume(void)
static void Print_SuspendResume(void)
{
pr_notice("CoreFreq: %s(%u:%d:%d)\n",
CoreFreqK.ResumeFromSuspend ? "Suspend" : "Resume",
Expand Down Expand Up @@ -5816,7 +5816,7 @@ static void SMBIOS_Entries(const struct dmi_header *dh, void *priv)
#undef safe_strim
#endif /* CONFIG_DMI */

inline void SMBIOS_Decoder(void)
static void SMBIOS_Decoder(void)
{
#ifdef CONFIG_DMI
size_t count = 0;
Expand Down
24 changes: 12 additions & 12 deletions x86_64/corefreqk.c
Original file line number Diff line number Diff line change
Expand Up @@ -4143,7 +4143,7 @@ static void Compute_ACPI_CPPC_Bounds(unsigned int cpu)
}
}

inline signed int Disable_ACPI_CPPC(unsigned int cpu, void *arg)
static signed int Disable_ACPI_CPPC(unsigned int cpu, void *arg)
{
#if defined(CONFIG_ACPI_CPPC_LIB) \
&& LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
Expand All @@ -4162,7 +4162,7 @@ inline signed int Disable_ACPI_CPPC(unsigned int cpu, void *arg)
return rc;
}

inline signed int Enable_ACPI_CPPC(unsigned int cpu, void *arg)
static signed int Enable_ACPI_CPPC(unsigned int cpu, void *arg)
{
#if defined(CONFIG_ACPI_CPPC_LIB) \
&& LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
Expand Down Expand Up @@ -7999,7 +7999,7 @@ static void Query_AMD_Family_14h(unsigned int cpu)
HyperThreading_Technology();
}

inline unsigned int AMD_F15h_CoreCOF(unsigned int FID, unsigned int DID)
static unsigned int AMD_F15h_CoreCOF(unsigned int FID, unsigned int DID)
{/* CoreCOF (MHz) = 100 * (CpuFid[5:0] + 10h) / (2 ^ CpuDid) */
unsigned int COF = (FID + 0x10) / (1 << DID);

Expand Down Expand Up @@ -8098,7 +8098,7 @@ static void Query_AMD_Family_15h(unsigned int cpu)
Default_Unlock_Reset();
}

inline COF_ST AMD_Zen_CoreCOF(PSTATEDEF PStateDef)
static COF_ST AMD_Zen_CoreCOF(PSTATEDEF PStateDef)
{
unsigned long remainder;
COF_ST COF;
Expand Down Expand Up @@ -8133,7 +8133,7 @@ inline COF_ST AMD_Zen_CoreCOF(PSTATEDEF PStateDef)
return COF;
}

inline unsigned short AMD_Zen_Compute_FID_DID( unsigned int COF,
static unsigned short AMD_Zen_Compute_FID_DID( unsigned int COF,
unsigned int *FID,
unsigned int *DID )
{
Expand All @@ -8151,7 +8151,7 @@ inline unsigned short AMD_Zen_Compute_FID_DID( unsigned int COF,
}
}

inline unsigned short AMD_Zen5_Compute_FID( unsigned int COF,
static unsigned short AMD_Zen5_Compute_FID( unsigned int COF,
unsigned int *FID )
{
unsigned int tmp = (COF << 1) * 10;
Expand Down Expand Up @@ -8478,7 +8478,7 @@ static void BaseClock_AMD_Zen_PerCore(void *arg)
}
}

inline unsigned short CPPC_AMD_Zen_ScaleRatio( CORE_RO *Core,
static unsigned short CPPC_AMD_Zen_ScaleRatio( CORE_RO *Core,
unsigned int scale,
unsigned short hint,
unsigned short CPB )
Expand All @@ -8499,7 +8499,7 @@ inline unsigned short CPPC_AMD_Zen_ScaleRatio( CORE_RO *Core,
return scaled;
}

inline unsigned int CPPC_AMD_Zen_ScaleHint( CORE_RO *Core,
static unsigned int CPPC_AMD_Zen_ScaleHint( CORE_RO *Core,
unsigned int scale,
signed int ratio,
unsigned short CPB )
Expand Down Expand Up @@ -11672,7 +11672,7 @@ struct CSTATES_ENCODING_ST {
};

#define MAKE_TOGGLE_CSTATE_FUNC( _type, _feature, _parameter ) \
inline unsigned int Toggle_CState_##_feature( _type *pConfigRegister, \
static unsigned int Toggle_CState_##_feature( _type *pConfigRegister, \
typeof(_parameter) _parameter) \
{ \
switch ( _parameter ) \
Expand Down Expand Up @@ -20136,7 +20136,7 @@ static void Cycle_AMD_Family_17h(CORE_RO *Core,
BITSET(LOCKLESS, PUBLIC(RW(Core, AT(Core->Bind)))->Sync.V, NTFY);
}

inline void SoC_RAPL(AMD_17_SVI SVI, const unsigned long long factor)
static void SoC_RAPL(AMD_17_SVI SVI, const unsigned long long factor)
{
unsigned long long VCC, ICC, ACCU;
/* PLATFORM RAPL workaround to provide the SoC power */
Expand Down Expand Up @@ -23687,7 +23687,7 @@ static struct file_operations CoreFreqK_fops = {
};

#ifdef CONFIG_PM_SLEEP
inline void Print_SuspendResume(void)
static void Print_SuspendResume(void)
{
pr_notice("CoreFreq: %s(%u:%d:%d)\n",
CoreFreqK.ResumeFromSuspend ? "Suspend" : "Resume",
Expand Down Expand Up @@ -24037,7 +24037,7 @@ static void SMBIOS_Entries(const struct dmi_header *dh, void *priv)
#undef safe_strim
#endif /* CONFIG_DMI */

inline void SMBIOS_Decoder(void)
static void SMBIOS_Decoder(void)
{
#ifdef CONFIG_DMI
size_t count = 0;
Expand Down

0 comments on commit f314201

Please sign in to comment.