mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
cpufreq: speedstep-lib: Use int type to store negative error codes
Change the return type of the speedstep_get_freqs() function from unsigned int to int because it may return negative error codes. For the same reason, change the 'ret' variables to int type as well. No effect on runtime. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Link: https://patch.msgid.link/20250902114545.651661-4-rongqianfeng@vivo.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
b49d708495
commit
e5e9b7bd86
2 changed files with 11 additions and 11 deletions
|
|
@ -378,16 +378,16 @@ EXPORT_SYMBOL_GPL(speedstep_detect_processor);
|
|||
* DETECT SPEEDSTEP SPEEDS *
|
||||
*********************************************************************/
|
||||
|
||||
unsigned int speedstep_get_freqs(enum speedstep_processor processor,
|
||||
unsigned int *low_speed,
|
||||
unsigned int *high_speed,
|
||||
unsigned int *transition_latency,
|
||||
void (*set_state) (unsigned int state))
|
||||
int speedstep_get_freqs(enum speedstep_processor processor,
|
||||
unsigned int *low_speed,
|
||||
unsigned int *high_speed,
|
||||
unsigned int *transition_latency,
|
||||
void (*set_state)(unsigned int state))
|
||||
{
|
||||
unsigned int prev_speed;
|
||||
unsigned int ret = 0;
|
||||
unsigned long flags;
|
||||
ktime_t tv1, tv2;
|
||||
int ret = 0;
|
||||
|
||||
if ((!processor) || (!low_speed) || (!high_speed) || (!set_state))
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ extern unsigned int speedstep_get_frequency(enum speedstep_processor processor);
|
|||
* SPEEDSTEP_LOW; the second argument is zero so that no
|
||||
* cpufreq_notify_transition calls are initiated.
|
||||
*/
|
||||
extern unsigned int speedstep_get_freqs(enum speedstep_processor processor,
|
||||
unsigned int *low_speed,
|
||||
unsigned int *high_speed,
|
||||
unsigned int *transition_latency,
|
||||
void (*set_state) (unsigned int state));
|
||||
extern int speedstep_get_freqs(enum speedstep_processor processor,
|
||||
unsigned int *low_speed,
|
||||
unsigned int *high_speed,
|
||||
unsigned int *transition_latency,
|
||||
void (*set_state)(unsigned int state));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue