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: <1jk01mhaeg.fsf@starbuckisacylon.baylibre.com>
Date:   Mon, 16 Jan 2023 14:27:57 +0100
From:   Jerome Brunet <jbrunet@...libre.com>
To:     Simon Horman <simon.horman@...igine.com>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        linux-amlogic@...ts.infradead.org,
        Kevin Hilman <khilman@...libre.com>,
        Neil Armstrong <neil.armstrong@...aro.org>,
        Da Xue <da@...sconfused.com>, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net: mdio: add amlogic gxl mdio mux support


On Mon 16 Jan 2023 at 13:11, Simon Horman <simon.horman@...igine.com> wrote:

> On Mon, Jan 16, 2023 at 10:16:36AM +0100, Jerome Brunet wrote:
>> Add support for the mdio mux and internal phy glue of the GXL SoC
>> family
>> 
>> Signed-off-by: Jerome Brunet <jbrunet@...libre.com>
>> ---
>>  drivers/net/mdio/Kconfig              |  11 ++
>>  drivers/net/mdio/Makefile             |   1 +
>>  drivers/net/mdio/mdio-mux-meson-gxl.c | 160 ++++++++++++++++++++++++++
>>  3 files changed, 172 insertions(+)
>>  create mode 100644 drivers/net/mdio/mdio-mux-meson-gxl.c
>
> Hi Jerome,
>
> please run this patch through checkpatch.

Shame ... I really thought I did, but I forgot indeed.
I am really sorry for this. I'll fix everything.

>
> ...
>
>> diff --git a/drivers/net/mdio/mdio-mux-meson-gxl.c b/drivers/net/mdio/mdio-mux-meson-gxl.c
>> new file mode 100644
>> index 000000000000..205095d845ea
>> --- /dev/null
>> +++ b/drivers/net/mdio/mdio-mux-meson-gxl.c
>
> ...
>
>> +static int gxl_enable_internal_mdio(struct gxl_mdio_mux *priv)
>> +{
>
> nit: I think void would be a more appropriate return type for this
>      function. Likewise gxl_enable_external_mdio()
>
> ...
>
>> +static int gxl_mdio_mux_probe(struct platform_device *pdev){
>
> nit: '{' should be at the beginning of a new line
>
>> +	struct device *dev = &pdev->dev;
>> +	struct clk *rclk;
>> +	struct gxl_mdio_mux *priv;
>
> nit: reverse xmas tree for local variable declarations.
>
>> +	int ret;
>> +
>> +	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
>> +	if (!priv)
>> +		return -ENOMEM;
>
> nit: may be it is nicer to use dev_err_probe() here for consistency.

That was on purpose. I only use the `dev_err_probe()` when the probe may
defer, which I don't expect here.

I don't mind changing if you prefer it this way.

>
>> +	platform_set_drvdata(pdev, priv);
>> +
>> +	priv->regs = devm_platform_ioremap_resource(pdev, 0);
>> +	if (IS_ERR(priv->regs))
>> +		return PTR_ERR(priv->regs);
>
> And here.
>
> ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ