From: Mark Brown <broonie@kernel.org>
To: John Madieu <john.madieu@gmail.com>
Cc: heiko@sntech.de, jon.lin@rock-chips.com,
linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] spi: rockchip: Drop dead zero-check on fifo_len
Date: Mon, 27 Apr 2026 05:36:34 +0900 [thread overview]
Message-ID: <ae53UlXrMIhARp7U@sirena.co.uk> (raw)
In-Reply-To: <20260425092936.2590132-4-john.madieu@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 641 bytes --]
On Sat, Apr 25, 2026 at 09:29:36AM +0000, John Madieu wrote:
> rs->fifo_len is assigned from get_fifo_len(), which returns 64 for the
> two known SPI controller versions and 32 for everything else - never 0.
> The subsequent
> if (!rs->fifo_len)
> return dev_err_probe(...);
> is therefore unreachable.
> Drop the check. If unknown controller versions ever need to fail probe
> explicitly, that should be expressed in get_fifo_len() itself, not
> through an impossible post-condition.
That looks like it's intended as a "you added a new hardware type and
forgot to fill in this field" type check intended to never fire in
production?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-04-26 20:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-25 9:29 [PATCH 0/3] spi: rockchip: ISR fix and minor cleanups John Madieu
2026-04-25 9:29 ` [PATCH 1/3] spi: rockchip: Read ISR, not IMR, to detect cs-inactive IRQ John Madieu
2026-04-25 9:29 ` [PATCH 2/3] spi: rockchip: Drop unused and broken CR0 macros John Madieu
2026-04-25 9:29 ` [PATCH 3/3] spi: rockchip: Drop dead zero-check on fifo_len John Madieu
2026-04-26 20:36 ` Mark Brown [this message]
[not found] ` <CAM9Qs9B8SSGXrR47toj9P+_EUHzrwKwHnu9askVhGxm9WFzQCQ@mail.gmail.com>
2026-04-26 21:03 ` Mark Brown
2026-04-26 21:57 ` (subset) [PATCH 0/3] spi: rockchip: ISR fix and minor cleanups Mark Brown
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=ae53UlXrMIhARp7U@sirena.co.uk \
--to=broonie@kernel.org \
--cc=heiko@sntech.de \
--cc=john.madieu@gmail.com \
--cc=jon.lin@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox