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: <YBq+qaOwJdNOllQ/@rocinante>
Date:   Wed, 3 Feb 2021 16:18:01 +0100
From:   Krzysztof WilczyƄski <kw@...ux.com>
To:     Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc:     Binghui Wang <wangbinghui@...ilicon.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Mark Brown <broonie@...nel.org>, Rob Herring <robh@...nel.org>,
        Xiaowei Song <songxiaowei@...ilicon.com>,
        linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH v2 09/11] PCI: dwc: pcie-kirin: allow using multiple
 reset GPIOs


Hi Mauro,

Thank you for working on this!

> @@ -151,8 +152,10 @@ struct kirin_pcie {
>       struct clk      *phy_ref_clk;
>       struct clk      *pcie_aclk;
>       struct clk      *pcie_aux_clk;
> -     int             gpio_id_reset[4];
> +     int             n_gpio_resets;
>       int             gpio_id_clkreq[3];
> +     int             gpio_id_reset[MAX_GPIO_RESETS];
> +     const char      *reset_names[MAX_GPIO_RESETS];
>       u32             eye_param[5];
>  };
[...]

A small nit, so feel free to ignore, of course.

The "n_gpio_resets" variable might be better as "gpio_resets_num" or
"gpio_resets_count" - both are popular name suffixes for that type of
variables.  To add, other variables also start with "gpio_", thus it
would also follow the naming pattern.

[...]
> +     kirin_pcie->n_gpio_resets = of_gpio_named_count(np, "reset-gpios");
[...]

This would then become (for example):

  kirin_pcie->gpio_resets_count = of_gpio_named_count(np, "reset-gpios");

Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ