From: Sai Krishna Potthuri <lakshmis@xilinx.com> To: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Linus Walleij <linus.walleij@linaro.org>, Rob Herring <robh+dt@kernel.org>, Michal Simek <michals@xilinx.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, devicetree <devicetree@vger.kernel.org>, "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>, git <git@xilinx.com>, "saikrishna12468@gmail.com" <saikrishna12468@gmail.com> Subject: RE: [PATCH v6 3/3] pinctrl: Add Xilinx ZynqMP pinctrl driver support Date: Tue, 11 May 2021 12:38:12 +0000 [thread overview] Message-ID: <DM5PR02MB38771A8BEEB3E01006B14E46BD539@DM5PR02MB3877.namprd02.prod.outlook.com> (raw) In-Reply-To: <DM5PR02MB387726AB4144F0DB28105007BD409@DM5PR02MB3877.namprd02.prod.outlook.com> Hi Andy Shevchenko, > -----Original Message----- > From: Sai Krishna Potthuri > Sent: Wednesday, April 28, 2021 11:04 AM > To: Andy Shevchenko <andy.shevchenko@gmail.com> > Cc: Linus Walleij <linus.walleij@linaro.org>; Rob Herring > <robh+dt@kernel.org>; Michal Simek <michals@xilinx.com>; Greg Kroah- > Hartman <gregkh@linuxfoundation.org>; linux-arm Mailing List <linux-arm- > kernel@lists.infradead.org>; Linux Kernel Mailing List <linux- > kernel@vger.kernel.org>; devicetree <devicetree@vger.kernel.org>; open > list:GPIO SUBSYSTEM <linux-gpio@vger.kernel.org>; git <git@xilinx.com>; > saikrishna12468@gmail.com > Subject: RE: [PATCH v6 3/3] pinctrl: Add Xilinx ZynqMP pinctrl driver support > > Hi Andy Shevchenko, > > > -----Original Message----- > > From: Andy Shevchenko <andy.shevchenko@gmail.com> > > Sent: Monday, April 26, 2021 7:35 PM > > To: Sai Krishna Potthuri <lakshmis@xilinx.com> > > Cc: Linus Walleij <linus.walleij@linaro.org>; Rob Herring > > <robh+dt@kernel.org>; Michal Simek <michals@xilinx.com>; Greg Kroah- > > Hartman <gregkh@linuxfoundation.org>; linux-arm Mailing List <linux-arm- > > kernel@lists.infradead.org>; Linux Kernel Mailing List <linux- > > kernel@vger.kernel.org>; devicetree <devicetree@vger.kernel.org>; open > > list:GPIO SUBSYSTEM <linux-gpio@vger.kernel.org>; git <git@xilinx.com>; > > saikrishna12468@gmail.com > > Subject: Re: [PATCH v6 3/3] pinctrl: Add Xilinx ZynqMP pinctrl driver > support ... > > > > > > > + ret = zynqmp_pm_pinctrl_get_config(pin, param, &arg); > > > > > + if (arg != PM_PINCTRL_BIAS_PULL_UP) > > > > > + return -EINVAL; > > > > > > > > Error code being shadowed. Instead check it here properly. > > > > > Are you mentioning the case where ret is also a non-zero? > > > If yes, then I will update this check to > > > if (!ret && arg != PM_PINCTRL_BIAS_PULL_UP) > > > return -EINVAL; > > > > No, this is wrong in the same way. > > > > > ret non-zero case, we are handling at the end of switch case. > > > > I meant that you need to pass the real return code to the (upper) caller. > Here we are checking for valid argument and not the return value of the API. > If the read value(argument) is not valid and return value of the API is > zero (SUCCESS) then framework expects driver to be returned with > '-EINVAL' and it is a legal error code in this case. Do you agree on this? I am ready with the other changes, will send out the patch to address your comments. Regards Sai Krishna
WARNING: multiple messages have this Message-ID (diff)
From: Sai Krishna Potthuri <lakshmis@xilinx.com> To: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Linus Walleij <linus.walleij@linaro.org>, Rob Herring <robh+dt@kernel.org>, Michal Simek <michals@xilinx.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, devicetree <devicetree@vger.kernel.org>, "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>, git <git@xilinx.com>, "saikrishna12468@gmail.com" <saikrishna12468@gmail.com> Subject: RE: [PATCH v6 3/3] pinctrl: Add Xilinx ZynqMP pinctrl driver support Date: Tue, 11 May 2021 12:38:12 +0000 [thread overview] Message-ID: <DM5PR02MB38771A8BEEB3E01006B14E46BD539@DM5PR02MB3877.namprd02.prod.outlook.com> (raw) In-Reply-To: <DM5PR02MB387726AB4144F0DB28105007BD409@DM5PR02MB3877.namprd02.prod.outlook.com> Hi Andy Shevchenko, > -----Original Message----- > From: Sai Krishna Potthuri > Sent: Wednesday, April 28, 2021 11:04 AM > To: Andy Shevchenko <andy.shevchenko@gmail.com> > Cc: Linus Walleij <linus.walleij@linaro.org>; Rob Herring > <robh+dt@kernel.org>; Michal Simek <michals@xilinx.com>; Greg Kroah- > Hartman <gregkh@linuxfoundation.org>; linux-arm Mailing List <linux-arm- > kernel@lists.infradead.org>; Linux Kernel Mailing List <linux- > kernel@vger.kernel.org>; devicetree <devicetree@vger.kernel.org>; open > list:GPIO SUBSYSTEM <linux-gpio@vger.kernel.org>; git <git@xilinx.com>; > saikrishna12468@gmail.com > Subject: RE: [PATCH v6 3/3] pinctrl: Add Xilinx ZynqMP pinctrl driver support > > Hi Andy Shevchenko, > > > -----Original Message----- > > From: Andy Shevchenko <andy.shevchenko@gmail.com> > > Sent: Monday, April 26, 2021 7:35 PM > > To: Sai Krishna Potthuri <lakshmis@xilinx.com> > > Cc: Linus Walleij <linus.walleij@linaro.org>; Rob Herring > > <robh+dt@kernel.org>; Michal Simek <michals@xilinx.com>; Greg Kroah- > > Hartman <gregkh@linuxfoundation.org>; linux-arm Mailing List <linux-arm- > > kernel@lists.infradead.org>; Linux Kernel Mailing List <linux- > > kernel@vger.kernel.org>; devicetree <devicetree@vger.kernel.org>; open > > list:GPIO SUBSYSTEM <linux-gpio@vger.kernel.org>; git <git@xilinx.com>; > > saikrishna12468@gmail.com > > Subject: Re: [PATCH v6 3/3] pinctrl: Add Xilinx ZynqMP pinctrl driver > support ... > > > > > > > + ret = zynqmp_pm_pinctrl_get_config(pin, param, &arg); > > > > > + if (arg != PM_PINCTRL_BIAS_PULL_UP) > > > > > + return -EINVAL; > > > > > > > > Error code being shadowed. Instead check it here properly. > > > > > Are you mentioning the case where ret is also a non-zero? > > > If yes, then I will update this check to > > > if (!ret && arg != PM_PINCTRL_BIAS_PULL_UP) > > > return -EINVAL; > > > > No, this is wrong in the same way. > > > > > ret non-zero case, we are handling at the end of switch case. > > > > I meant that you need to pass the real return code to the (upper) caller. > Here we are checking for valid argument and not the return value of the API. > If the read value(argument) is not valid and return value of the API is > zero (SUCCESS) then framework expects driver to be returned with > '-EINVAL' and it is a legal error code in this case. Do you agree on this? I am ready with the other changes, will send out the patch to address your comments. Regards Sai Krishna _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-05-11 12:38 UTC|newest] Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-22 8:29 [PATCH v6 0/3] Add ZynqMP pinctrl driver Sai Krishna Potthuri 2021-04-22 8:29 ` Sai Krishna Potthuri 2021-04-22 8:30 ` [PATCH v6 1/3] firmware: xilinx: Add pinctrl support Sai Krishna Potthuri 2021-04-22 8:30 ` Sai Krishna Potthuri 2021-04-22 8:30 ` [PATCH v6 2/3] dt-bindings: pinctrl: Add binding for ZynqMP pinctrl driver Sai Krishna Potthuri 2021-04-22 8:30 ` Sai Krishna Potthuri 2021-04-22 8:30 ` [PATCH v6 3/3] pinctrl: Add Xilinx ZynqMP pinctrl driver support Sai Krishna Potthuri 2021-04-22 8:30 ` Sai Krishna Potthuri 2021-04-22 16:39 ` kernel test robot 2021-04-23 15:53 ` Andy Shevchenko 2021-04-23 15:53 ` Andy Shevchenko 2021-04-26 13:20 ` Sai Krishna Potthuri 2021-04-26 13:20 ` Sai Krishna Potthuri 2021-04-26 14:04 ` Andy Shevchenko 2021-04-26 14:04 ` Andy Shevchenko 2021-04-27 7:23 ` Michal Simek 2021-04-27 7:23 ` Michal Simek 2021-04-27 7:31 ` Andy Shevchenko 2021-04-27 7:31 ` Andy Shevchenko 2021-04-27 7:38 ` Michal Simek 2021-04-27 7:38 ` Michal Simek 2021-04-27 8:39 ` Andy Shevchenko 2021-04-27 8:39 ` Andy Shevchenko 2021-04-27 9:59 ` Michal Simek 2021-04-27 9:59 ` Michal Simek 2021-04-27 14:04 ` Andy Shevchenko 2021-04-27 14:04 ` Andy Shevchenko 2021-04-28 5:33 ` Sai Krishna Potthuri 2021-04-28 5:33 ` Sai Krishna Potthuri 2021-05-11 12:38 ` Sai Krishna Potthuri [this message] 2021-05-11 12:38 ` Sai Krishna Potthuri 2021-06-17 6:37 ` Sai Krishna Potthuri 2021-06-17 6:37 ` Sai Krishna Potthuri 2021-06-17 7:18 ` Andy Shevchenko 2021-06-17 7:18 ` Andy Shevchenko 2021-06-17 7:31 ` Greg Kroah-Hartman 2021-06-17 7:31 ` Greg Kroah-Hartman 2021-04-22 9:13 ` [PATCH v6 0/3] Add ZynqMP pinctrl driver Linus Walleij 2021-04-22 9:13 ` Linus Walleij 2021-04-23 15:54 ` Andy Shevchenko 2021-04-23 15:54 ` Andy Shevchenko 2021-04-29 14:21 ` Linus Walleij 2021-04-29 14:21 ` Linus Walleij 2021-04-29 14:32 ` Sai Krishna Potthuri 2021-04-29 14:32 ` Sai Krishna Potthuri
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=DM5PR02MB38771A8BEEB3E01006B14E46BD539@DM5PR02MB3877.namprd02.prod.outlook.com \ --to=lakshmis@xilinx.com \ --cc=andy.shevchenko@gmail.com \ --cc=devicetree@vger.kernel.org \ --cc=git@xilinx.com \ --cc=gregkh@linuxfoundation.org \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=michals@xilinx.com \ --cc=robh+dt@kernel.org \ --cc=saikrishna12468@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.