lkml.org 
[lkml]   [2011]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH 1/2] pinmux: Remove double pin validity check.
Belisko Marek wrote at Wednesday, October 26, 2011 2:57 PM:
> Function pin_is_valid just call pin_desc_get which is in pin_request
> call some line below. Remove pin_is_valid() check.
...
> @@ -112,16 +112,6 @@ static int pin_request(struct pinctrl_dev *pctldev,
>
> dev_dbg(&pctldev->dev, "request pin %d for %s\n", pin, function);
>
> - if (!pin_is_valid(pctldev, pin)) {
> - dev_err(&pctldev->dev, "pin is invalid\n");
> - return -EINVAL;
> - }

So that makes sense.

> -
> - if (!function) {
> - dev_err(&pctldev->dev, "no function name given\n");
> - return -EINVAL;
> - }

But I don't think you want to remove that? Oh actually, perhaps removing
that /is/ valid, since it's an internal function and can't be called with
a NULL function parameter. But, you should mention why in the changelog
so it doesn't look like a mistake.

--
nvpublic



\
 
 \ /
  Last update: 2011-10-27 18:41    [W:0.082 / U:1.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site