On 08/29/2016 09:54 PM, Wolfram Sang wrote:
+static struct governor_priv *find_governor_by_name(const char *gov_name)
+{
+ struct governor_priv *priv;
+
+ list_for_each_entry(priv, &governor_list, entry)
+ if (!strncmp(gov_name, priv->gov->name,
strncmp forces to use 'echo -n' in userspace which can cause confusion
when if '-n' is forgotten. The cpufreq code pre-parses the buffer with
sscanf() to eliminate the terminating newline. There is also
sysfs_streq() which seems the a tad better solution to me.
I agree, sysfs_streq() looks like the appropriate choice here.
I will fix it, thank you for review and testing.
--
With best wishes,
Vladimir
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html