RE: [PATCH v6 3/3] pinctrl: Add Xilinx ZynqMP pinctrl driver support
From: Sai Krishna Potthuri <hidden>
Date: 2021-06-17 06:37:23
Also in:
linux-devicetree, linux-gpio, lkml
Ping!
-----Original Message----- From: Sai Krishna Potthuri <redacted> Sent: Tuesday, May 11, 2021 6:08 PM To: Andy Shevchenko <redacted> Cc: Linus Walleij <redacted>; Rob Herring [off-list ref]; Michal Simek [off-list ref]; Greg Kroah- Hartman [off-list ref]; linux-arm Mailing List <linux-arm- kernel@lists.infradead.org>; Linux Kernel Mailing List <linux- kernel@vger.kernel.org>; devicetree [off-list ref]; open list:GPIO SUBSYSTEM [off-list ref]; git [off-list ref]; saikrishna12468@gmail.com Subject: RE: [PATCH v6 3/3] pinctrl: Add Xilinx ZynqMP pinctrl driver support Hi Andy Shevchenko,quoted
-----Original Message----- From: Sai Krishna Potthuri Sent: Wednesday, April 28, 2021 11:04 AM To: Andy Shevchenko <redacted> Cc: Linus Walleij <redacted>; Rob Herring [off-list ref]; Michal Simek [off-list ref]; Greg Kroah- Hartman [off-list ref]; linux-arm Mailing List <linux-arm- kernel@lists.infradead.org>; Linux Kernel Mailing List <linux- kernel@vger.kernel.org>; devicetree [off-list ref]; open list:GPIO SUBSYSTEM [off-list ref]; git [off-list ref]; saikrishna12468@gmail.com Subject: RE: [PATCH v6 3/3] pinctrl: Add Xilinx ZynqMP pinctrl driver support Hi Andy Shevchenko,quoted
-----Original Message----- From: Andy Shevchenko <redacted> Sent: Monday, April 26, 2021 7:35 PM To: Sai Krishna Potthuri <redacted> Cc: Linus Walleij <redacted>; Rob Herring [off-list ref]; Michal Simek [off-list ref]; Greg Kroah- Hartman [off-list ref]; linux-arm Mailing List <linux-arm- kernel@lists.infradead.org>; Linux Kernel Mailing List <linux- kernel@vger.kernel.org>; devicetree [off-list ref]; open list:GPIO SUBSYSTEM [off-list ref]; git [off-list ref]; saikrishna12468@gmail.com Subject: Re: [PATCH v6 3/3] pinctrl: Add Xilinx ZynqMP pinctrl driversupport...quoted
quoted
quoted
quoted
quoted
+ 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.quoted
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.quoted
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 theAPI.quoted
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