> +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.
Attachment:
signature.asc
Description: PGP signature