* [PATCH] pinctrl: add error message to pinmux_map_to_setting's error path @ 2012-04-23 17:40 John Crispin [not found] ` <1335202806-19520-1-git-send-email-blogic-p3rKhJxN3npAfugRpC6u6w@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: John Crispin @ 2012-04-23 17:40 UTC (permalink / raw) To: Linus Walleij; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ If a non existent mux group is referenced inside a devicetree, we see no error. This patch adds the same type of error message that pinconf_map_to_setting() gives when the pin/group is unknown. Signed-off-by: John Crispin <blogic-p3rKhJxN3npAfugRpC6u6w@public.gmane.org> Cc: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- drivers/pinctrl/pinmux.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index 1056e68..7c840fb 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -349,8 +349,11 @@ int pinmux_map_to_setting(struct pinctrl_map const *map, break; } } - if (!found) + if (!found) { + dev_err(pctldev->dev, "could not find mux group \"%s\"", + group); return -EINVAL; + } } else { group = groups[0]; } -- 1.7.9.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <1335202806-19520-1-git-send-email-blogic-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>]
* Re: [PATCH] pinctrl: add error message to pinmux_map_to_setting's error path [not found] ` <1335202806-19520-1-git-send-email-blogic-p3rKhJxN3npAfugRpC6u6w@public.gmane.org> @ 2012-04-23 18:37 ` Stephen Warren [not found] ` <4F95A162.3080200-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Stephen Warren @ 2012-04-23 18:37 UTC (permalink / raw) To: John Crispin; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ On 04/23/2012 11:40 AM, John Crispin wrote: > If a non existent mux group is referenced inside a devicetree, we see no error. > > This patch adds the same type of error message that pinconf_map_to_setting() > gives when the pin/group is unknown. > > Signed-off-by: John Crispin <blogic-p3rKhJxN3npAfugRpC6u6w@public.gmane.org> > Cc: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> There are some other cases where more error messages would be useful, such as invalid function name, invalid config options etc. I was planning on going through the code and adding these since some of these are hitting me on a new board I'm adding to mainline. Are you planning to add more of these messages, or should I go ahead with that? I wonder if the message would be more useful if it said something like "invalid group %s for function %s" - that would give a little more information for the user to track down the incorrect entry, since that group name may be valid in general, just not for the function being converted. BTW, the "Cc" you added to the commit description doesn't appear to be happening; I'm only receiving this message through the list. ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <4F95A162.3080200-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* Re: [PATCH] pinctrl: add error message to pinmux_map_to_setting's error path [not found] ` <4F95A162.3080200-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> @ 2012-04-23 18:49 ` John Crispin 0 siblings, 0 replies; 3+ messages in thread From: John Crispin @ 2012-04-23 18:49 UTC (permalink / raw) To: Stephen Warren; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ > There are some other cases where more error messages would be useful, > such as invalid function name, invalid config options etc. I was > planning on going through the code and adding these since some of these > are hitting me on a new board I'm adding to mainline. Are you planning > to add more of these messages, or should I go ahead with that? I am in the process of converting the mips/lantiq/ target to OF and pinctrl amongst over things. i stumbled across the 2 patches i mailed today. i will be able to spare a couple of hours tomorrow to see if i can find more places where debug output would make sense. > I wonder if the message would be more useful if it said something like > "invalid group %s for function %s" - that would give a little more > information for the user to track down the incorrect entry, since that > group name may be valid in general, just not for the function being > converted. that is the case. lets see what i can come up with. > BTW, the "Cc" you added to the commit description doesn't appear to be > happening; I'm only receiving this message through the list. I realized this aswell, although i am subscribed to the list (even checked if i subscribed with this mail addr) . i will check the server logs and contact the list admins to see whats up ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-23 18:49 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-04-23 17:40 [PATCH] pinctrl: add error message to pinmux_map_to_setting's error path John Crispin [not found] ` <1335202806-19520-1-git-send-email-blogic-p3rKhJxN3npAfugRpC6u6w@public.gmane.org> 2012-04-23 18:37 ` Stephen Warren [not found] ` <4F95A162.3080200-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2012-04-23 18:49 ` John Crispin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).