[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZvFlKdSG7GgGPFnJ@finisterre.sirena.org.uk>
Date: Mon, 23 Sep 2024 14:55:05 +0200
From: Mark Brown <broonie@...nel.org>
To: Jinjie Ruan <ruanjinjie@...wei.com>
Cc: heiko@...ech.de, kernel@...il.dk, jon.lin@...k-chips.com,
linux-spi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: rockchip: Fix excessive check for get_fifo_len()
On Mon, Sep 23, 2024 at 07:55:16PM +0800, Jinjie Ruan wrote:
> Since commit 13a96935e6f6 ("spi: rockchip: Support 64-location deep
> FIFOs"), get_fifo_len() return 64 or 32, never return 0, so remove
> the excessive check in rockchip_spi_probe().
>
> Fixes: 13a96935e6f6 ("spi: rockchip: Support 64-location deep FIFOs")
This is clearly not a bug fix, it's at most a code cleanup but...
> @@ -819,11 +819,6 @@ static int rockchip_spi_probe(struct platform_device *pdev)
> }
>
> rs->fifo_len = get_fifo_len(rs);
> - if (!rs->fifo_len) {
> - dev_err(&pdev->dev, "Failed to get fifo length\n");
> - ret = -EINVAL;
> - goto err_put_ctlr;
> - }
...given that the probe() path isn't exactly a hot path is there really
any benefit from this, if someone does add the option of returning 0
it'll silently break.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists