lkml.org 
[lkml]   [2018]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] cpuidle/powernv : Add Description for cpuidle state
Date
Stewart Smith <stewart@linux.ibm.com> writes:

> Abhishek Goel <huntbag@linux.vnet.ibm.com> writes:
>> @@ -215,7 +216,7 @@ static inline void add_powernv_state(int index, const char *name,
>> u64 psscr_val, u64 psscr_mask)
>> {
>> strlcpy(powernv_states[index].name, name, CPUIDLE_NAME_LEN);
>> - strlcpy(powernv_states[index].desc, name, CPUIDLE_NAME_LEN);
>> + strlcpy(powernv_states[index].desc, desc, CPUIDLE_DESC_LEN);
>
> We should still fall back to using name in the event of desc being null,
> as not all firmware will expose the descriptions.
>
>> @@ -311,6 +313,11 @@ static int powernv_add_idle_states(void)
>> pr_warn("cpuidle-powernv: missing ibm,cpu-idle-state-names in DT\n");
>> goto out;
>> }
>> + if (of_property_read_string_array(power_mgt,
>> + "ibm,cpu-idle-state-descs", descs, dt_idle_states) < 0) {
>> + pr_warn("cpuidle-powernv: missing ibm,cpu-idle-state-descs in DT\n");
>> + goto out;
>> + }
>
> I don't think pr_warn is appropriate here, as for all current released
> firmware we don't have that property. I think perhaps just silently
> continuing on is okay, as we have to keep compatibility with that firmware.

+1

Anyone who's wondering why they're not seeing the names can just look at
the device tree on the machine to see if the property is there or not,
they don't need a printk in dmesg to tell them.

cheers

\
 
 \ /
  Last update: 2018-05-29 14:33    [W:0.039 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site