lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PUZPR06MB588786D49A7C1964E4A39851EF3AA@PUZPR06MB5887.apcprd06.prod.outlook.com>
Date: Fri, 29 Aug 2025 10:18:36 +0000
From: Gary Yang <gary.yang@...tech.com>
To: Krzysztof Kozlowski <krzk@...nel.org>, "linus.walleij@...aro.org"
	<linus.walleij@...aro.org>, "robh@...nel.org" <robh@...nel.org>,
	"krzk+dt@...nel.org" <krzk+dt@...nel.org>, "conor+dt@...nel.org"
	<conor+dt@...nel.org>
CC: "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	cix-kernel-upstream <cix-kernel-upstream@...tech.com>
Subject:
 回复: 回复: 回复: 回复: [PATCH 1/3] pinctrl: cix: Add pin-controller support for sky1

Hi Krzysztof,

> 
> On 29/08/2025 06:33, Gary Yang wrote:
> > Hi Krzysztof,
> >>
> >> On 28/08/2025 10:32, Gary Yang wrote:
> >>> Hi Krzysztof,
> >>>
> >>>>
> >>>> On 28/08/2025 08:44, Gary Yang wrote:
> >>>>>>
> >>>>>>> +     if (ret) {
> >>>>>>> +             dev_err(&pdev->dev, "fail to probe dt
> >>>>>>> + properties\n");
> >>>>>>
> >>>>>> You are printing same error twice. Drop this and just handle
> >>>>>> error printing in sky1_pinctrl_probe_dt().
> >>>>>> Especially that you now print errors on ENOMEM.
> >>>>>>
> >>>>>
> >>>>> Sorry, this print message is only once, not twice, please give
> >>>>> more information
> >>>>
> >>>> Trigger the error and check how many error messages you see. I see two.
> >>>> You should know your code better than me...
> >>>>
> >>>
> >>> There are two pin-controller on sky1. They share the same driver.
> >>> The probe
> >> is called twice.
> >>>
> >>> So we see the print message twice.
> >>
> >>
> >> No, you don't really understand how this works. Test your code and
> >> its error paths and you will see FOR ONE BIND more than one error
> message.
> >> Plus my second comment which you completely ignored.
> >>
> >> I am sorry, but this is basic C.
> >>
> >
> > In order to trigger a error, we add a sentence in sky1_pinctrl_probe_dt() as
> follow:
> >
> > static int sky1_pinctrl_probe_dt(struct platform_device *pdev,
> >                                  struct sky1_pinctrl *spctl) {
> >
> > +         return -ENODEV;
> >           .......
> > }
> >
> > dmesg shows as following:
> >
> > [    0.812780] /soc@...inctrl@...0000: Fixed dependency cycle(s) with
> /soc@...inctrl@...0000/hog-pins
> > [    0.821920] sky1-pinctrl 4170000.pinctrl: fail to probe dt properties
> > [    0.828503] /soc@...inctrl@...07000: Fixed dependency cycle(s) with
> /soc@...inctrl@...07000/hog-s5-pins
> > [    0.838058] sky1-pinctrl 16007000.pinctrl: fail to probe dt properties
> >
> > I don't see the error message twice per one. There are two pin-controller.
> One is /soc@...inctrl@...0000. Other is /soc@...inctrl@...07000.
> 
> And the next error case from sky1_pinctrl_probe_dt? ... and then the next one?
> And another one?
> 
> Really, either you didn't read your own code or you just push the same poor
> code, regardless of review, because you want it to get merged?
> 
> This will lead you nowhere.
> 
> You have:
> 
> +static int sky1_pinctrl_probe_dt(struct platform_device *pdev,
> +                               struct sky1_pinctrl *spctl)
> ...
> +               if (!function)
> +                       return -ENOMEM;
> ...
> +       if (ret) {
> +               dev_err(&pdev->dev, "fail to probe dt properties\n");
> +               return ret;
> +       }
> 
> That's a clear NAK.
> 
> Then you have:
> 
> +               if (nfuncs == 0) {
> +                       dev_err(&pdev->dev, "no functions defined\n");
> +                       return -EINVAL;
> ...
> +       if (ret) {
> +               dev_err(&pdev->dev, "fail to probe dt properties\n");
> +               return ret;
> +       }
> 
> that's useless duplicated message. TWICE.
> 
> You could easily spot it yourself instead of keep bugging the reviewer for such
> trivial stuff.
> 
> NAK, please remember to never waste reviewers time.
> 
> >
> > So you see the twice, once per one pin-controller. BTW as you suggested
> before, we will print the value of ret in the error message.
> >
> > If I miss any information, please kindly remind me. Thanks
> 
> You still ignored my second comment.
> 

First you wrote " You are printing same error twice ", please pay attention to the "same error" strings, it makes me confuse, I misunderstand your thinking 
until you took the example above. So the discussion is needed, not waste our time.

Second the return value of sky1_pinctrl_probe_dt() is not only ENOMEM, it can also return ENODEV and EINVAL. Although I don't think this is a bug, take our 
time consider, I will delete the print sentence in sky1_pinctrl_probe_dt(). It makes the error message only once.

Third Although the author is not me, I really read all driver codes before take my courage to submit this patch. Maybe the codes comes from old example, 
we can update these codes to support the newest standard.

Fourth I work as an kernel engineer many years. But I first push patches to Linux kernel. If I make some stupid mistake, please kindly remind me. Maybe your kind make me 
more courage on doing this valuable work. 

If miss any information, please let me know. Thanks for your understanding.

> 
> Best regards,
> Krzysztof

Best wishes
Gary

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ