Subject: Re: [patch net-next] devlink: add format requirement for devlink param names

From: Stephen Hemminger <[email-masked]>
Date: Fri, 18 Oct 2019 09:33:22 -0700

On Fri, 18 Oct 2019 18:07:26 +0200
Jiri Pirko <[email-masked]> wrote:

> +static bool devlink_param_valid_name(const char *name)
> +{
> +	int len = strlen(name);
> +	int i;
> +
> +	/* Name can contain lowercase characters or digits.
> +	 * Underscores are also allowed, but not at the beginning
> +	 * or end of the name and not more than one in a row.
> +	 */
> +
> +	for (i = 0; i < len; i++) {

Very minor stuff.
   1. since strlen technically returns size_t why not make both i and len type size_t
   2. no blank line after comment and before loop?