RE: [PATCH 1/2] pinmux: Remove double pin validity check.

From: Stephen Warren
Date: Thu Oct 27 2011 - 14:42:42 EST


Belisko Marek wrote at Thursday, October 27, 2011 12:40 PM:
> On Thu, Oct 27, 2011 at 6:37 PM, Stephen Warren <swarren@xxxxxxxxxx> wrote:
> > 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.
>
> Well it's not removed. It's moved below pin_desc_get call.

Sigh, so it is. In that case,

Acked-by: Stephen Warren <swarren@xxxxxxxxxx>

--
nvpublic

èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—