lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <520BB19E.8040901@wwwdotorg.org>
Date:	Wed, 14 Aug 2013 10:34:38 -0600
From:	Stephen Warren <swarren@...dotorg.org>
To:	Linus Walleij <linus.walleij@...aro.org>
CC:	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	Stephen Warren <swarren@...dia.com>,
	Sonic Zhang <sonic.zhang@...log.com>
Subject: Re: [PATCH] pinctrl: improve warning messages

On 08/14/2013 10:25 AM, Linus Walleij wrote:
> Print out the affected group name on activation of pin mux
> settings, and warn if you cannot free a pin that should have
> been part of a certain setting.

> diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c

> @@ -411,9 +415,14 @@ int pinmux_enable_setting(struct pinctrl_setting const *setting)
>  	for (i = 0; i < num_pins; i++) {
>  		ret = pin_request(pctldev, pins[i], setting->dev_name, NULL);
>  		if (ret) {
> +			const char *gname;
> +
> +			gname = pctlops->get_group_name(pctldev,
> +						setting->data.mux.group);
>  			dev_err(pctldev->dev,
> -				"could not request pin %d on device %s\n",
> -				pins[i], pinctrl_dev_get_name(pctldev));
> +				"could not request pin %d from group %s on "
> +				"device %s\n",
> +				pins[i], gname, pinctrl_dev_get_name(pctldev));

I think it'd be useful to print the pin name rather than pin number here.

> @@ -486,6 +499,16 @@ void pinmux_disable_setting(struct pinctrl_setting const *setting)
>  			desc->mux_setting = NULL;
>  			/* And release the pin */
>  			pin_free(pctldev, pins[i], NULL);
> +		} else {
> +			const char *gname;
> +
> +			gname = pctlops->get_group_name(pctldev,
> +						setting->data.mux.group);
> +			dev_warn(pctldev->dev,
> +				 "not freeing pin %d as part of deactivating "
> +				 "group %s - it is already used for some other "
> +				 "setting",
> +				 pins[i], gname);
>  		}
>  	}

I think that will only happen if one of the pinmux_enabling_setting
prints already happened. Is it worth adding this one?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ