From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754878Ab1J0Smn (ORCPT ); Thu, 27 Oct 2011 14:42:43 -0400 Received: from hqemgate04.nvidia.com ([216.228.121.35]:13387 "EHLO hqemgate04.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754362Ab1J0Smm (ORCPT ); Thu, 27 Oct 2011 14:42:42 -0400 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Thu, 27 Oct 2011 11:42:38 -0700 From: Stephen Warren To: Belisko Marek CC: "linus.walleij@linaro.org" , "grant.likely@secretlab.ca" , "linux-kernel@vger.kernel.org" Date: Thu, 27 Oct 2011 11:42:37 -0700 Subject: RE: [PATCH 1/2] pinmux: Remove double pin validity check. Thread-Topic: [PATCH 1/2] pinmux: Remove double pin validity check. Thread-Index: AcyU18VxUCtHmBSLR4qqNr04+vZu2AAAFU1w Message-ID: <74CDBE0F657A3D45AFBB94109FB122FF173E1B4962@HQMAIL01.nvidia.com> References: <1319662641-28416-1-git-send-email-marek.belisko@open-nandra.com> <74CDBE0F657A3D45AFBB94109FB122FF173E1B48D0@HQMAIL01.nvidia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id p9RIgqcZ024885 Belisko Marek wrote at Thursday, October 27, 2011 12:40 PM: > On Thu, Oct 27, 2011 at 6:37 PM, Stephen Warren 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 -- nvpublic ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¥Š{±þG«�éÿŠ{ayºʇڙë,j­¢f£¢·hš�ï�êÿ‘êçz_è®(­éšŽŠÝ¢j"�ú¶m§ÿÿ¾«þG«�éÿ¢¸?™¨è­Ú&£ø§~�á¶iO•æ¬z·švØ^¶m§ÿÿà ÿ¶ìÿ¢¸?–I¥