From: Andy Shevchenko <andy.shevchenko@gmail.com> To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Cc: "Tomer Maimon" <tmaimon77@gmail.com>, "Avi Fishman" <avifishman70@gmail.com>, "Tali Perry" <tali.perry1@gmail.com>, "Joel Stanley" <joel@jms.id.au>, "Patrick Venture" <venture@google.com>, "Nancy Yuen" <yuenn@google.com>, "Benjamin Fair" <benjaminfair@google.com>, "Linus Walleij" <linus.walleij@linaro.org>, "Rob Herring" <robh+dt@kernel.org>, "Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>, "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>, zhengbin13@huawei.com, "OpenBMC Maillist" <openbmc@lists.ozlabs.org>, "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>, "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>, devicetree <devicetree@vger.kernel.org> Subject: Re: [PATCH v2 2/2] pinctrl: nuvoton: add NPCM8XX pinctrl and GPIO driver Date: Thu, 14 Jul 2022 15:14:37 +0200 [thread overview] Message-ID: <CAHp75VepYwx9FCf0-7_MO9r7WNqxiTR7MAQcwSL4oNcdgt8qEA@mail.gmail.com> (raw) In-Reply-To: <b6a0abb7-f31f-0c8a-f65e-8d61b9e72f48@linaro.org> On Thu, Jul 14, 2022 at 2:29 PM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > On 14/07/2022 14:23, Tomer Maimon wrote: ... > > +static int npcm8xx_pinctrl_probe(struct platform_device *pdev) > > +{ Temporary variable, i.e. struct device *dev = &pdev->dev; > > + struct npcm8xx_pinctrl *pctrl; > > + int ret; > > + > > + pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL); > > + if (!pctrl) > > + return -ENOMEM; > > + > > + pctrl->dev = &pdev->dev; > > + dev_set_drvdata(&pdev->dev, pctrl); > > + > > + pctrl->gcr_regmap = > > + syscon_regmap_lookup_by_phandle(pctrl->dev->of_node, "nuvoton,sysgcr"); > > + if (IS_ERR(pctrl->gcr_regmap)) > > + return dev_err_probe(pctrl->dev, PTR_ERR(pctrl->gcr_regmap), "Failed to find nuvoton,sysgcr property\n"); Will help to shorten the above line(s). > Please wrap your code according to Linux coding style - @80. -- With Best Regards, Andy Shevchenko
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com> To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Cc: devicetree <devicetree@vger.kernel.org>, "Tomer Maimon" <tmaimon77@gmail.com>, "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>, "Avi Fishman" <avifishman70@gmail.com>, "Patrick Venture" <venture@google.com>, "Linus Walleij" <linus.walleij@linaro.org>, "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>, "Tali Perry" <tali.perry1@gmail.com>, zhengbin13@huawei.com, "Rob Herring" <robh+dt@kernel.org>, "Joel Stanley" <joel@jms.id.au>, "Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>, "OpenBMC Maillist" <openbmc@lists.ozlabs.org>, "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>, "Benjamin Fair" <benjaminfair@google.com> Subject: Re: [PATCH v2 2/2] pinctrl: nuvoton: add NPCM8XX pinctrl and GPIO driver Date: Thu, 14 Jul 2022 15:14:37 +0200 [thread overview] Message-ID: <CAHp75VepYwx9FCf0-7_MO9r7WNqxiTR7MAQcwSL4oNcdgt8qEA@mail.gmail.com> (raw) In-Reply-To: <b6a0abb7-f31f-0c8a-f65e-8d61b9e72f48@linaro.org> On Thu, Jul 14, 2022 at 2:29 PM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > On 14/07/2022 14:23, Tomer Maimon wrote: ... > > +static int npcm8xx_pinctrl_probe(struct platform_device *pdev) > > +{ Temporary variable, i.e. struct device *dev = &pdev->dev; > > + struct npcm8xx_pinctrl *pctrl; > > + int ret; > > + > > + pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL); > > + if (!pctrl) > > + return -ENOMEM; > > + > > + pctrl->dev = &pdev->dev; > > + dev_set_drvdata(&pdev->dev, pctrl); > > + > > + pctrl->gcr_regmap = > > + syscon_regmap_lookup_by_phandle(pctrl->dev->of_node, "nuvoton,sysgcr"); > > + if (IS_ERR(pctrl->gcr_regmap)) > > + return dev_err_probe(pctrl->dev, PTR_ERR(pctrl->gcr_regmap), "Failed to find nuvoton,sysgcr property\n"); Will help to shorten the above line(s). > Please wrap your code according to Linux coding style - @80. -- With Best Regards, Andy Shevchenko
next prev parent reply other threads:[~2022-07-14 13:15 UTC|newest] Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-14 12:23 [PATCH v2 0/2] pinctrl: nuvoton: add pinmux and GPIO driver for NPCM8XX Tomer Maimon 2022-07-14 12:23 ` Tomer Maimon 2022-07-14 12:23 ` [PATCH v2 1/2] dt-binding: pinctrl: Add NPCM8XX pinctrl and GPIO documentation Tomer Maimon 2022-07-14 12:23 ` Tomer Maimon 2022-07-18 21:10 ` Rob Herring 2022-07-18 21:10 ` Rob Herring 2022-09-18 18:28 ` Tomer Maimon 2022-09-18 18:28 ` Tomer Maimon 2022-09-19 6:56 ` Krzysztof Kozlowski 2022-09-19 14:31 ` Tomer Maimon 2022-09-19 14:31 ` Tomer Maimon 2022-09-19 16:06 ` Krzysztof Kozlowski 2022-09-20 7:59 ` Tomer Maimon 2022-09-20 7:59 ` Tomer Maimon 2022-09-20 8:21 ` Krzysztof Kozlowski 2022-09-20 8:32 ` Tomer Maimon 2022-09-20 8:32 ` Tomer Maimon 2022-09-20 8:47 ` Krzysztof Kozlowski 2022-09-20 9:27 ` Tomer Maimon 2022-09-20 9:27 ` Tomer Maimon 2022-09-20 15:16 ` Krzysztof Kozlowski 2022-09-20 17:00 ` Tomer Maimon 2022-09-20 17:00 ` Tomer Maimon 2022-07-14 12:23 ` [PATCH v2 2/2] pinctrl: nuvoton: add NPCM8XX pinctrl and GPIO driver Tomer Maimon 2022-07-14 12:23 ` Tomer Maimon 2022-07-14 12:25 ` Krzysztof Kozlowski 2022-07-14 13:14 ` Andy Shevchenko [this message] 2022-07-14 13:14 ` Andy Shevchenko 2022-07-14 16:59 ` Andy Shevchenko 2022-07-14 16:59 ` Andy Shevchenko 2022-07-18 1:24 ` kernel test robot 2022-07-18 1:24 ` kernel test robot 2022-07-16 16:21 kernel test robot 2022-07-18 13:41 kernel test robot
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=CAHp75VepYwx9FCf0-7_MO9r7WNqxiTR7MAQcwSL4oNcdgt8qEA@mail.gmail.com \ --to=andy.shevchenko@gmail.com \ --cc=avifishman70@gmail.com \ --cc=benjaminfair@google.com \ --cc=devicetree@vger.kernel.org \ --cc=j.neuschaefer@gmx.net \ --cc=joel@jms.id.au \ --cc=krzysztof.kozlowski+dt@linaro.org \ --cc=krzysztof.kozlowski@linaro.org \ --cc=linus.walleij@linaro.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=openbmc@lists.ozlabs.org \ --cc=robh+dt@kernel.org \ --cc=tali.perry1@gmail.com \ --cc=tmaimon77@gmail.com \ --cc=venture@google.com \ --cc=yuenn@google.com \ --cc=zhengbin13@huawei.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.