Re: [PATCH v4 6/7] watchdog: pretimeout: add option to select a pretimeout governor in runtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux