Re: [PATCH 2/2] spi: dw: use DW_SPI_INT_MASK instead of hardcoded 0xff
Mark Brown <[email protected]>
| Newsgroups | org.kernel.vger.linux-spi,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Aug 17, 2026 at 11:14:04PM +0800, Jisheng Zhang wrote:
> The Interrupt Mask Register valid bits is bit[5:0] which is well
> defined with DW_SPI_INT_MASK, use it instead of the incorrect(but no
> harm) and hardcoded 0xff.
> dw_reader(dws);
> if (!dws->rx_len) {
> - dw_spi_mask_intr(dws, 0xff);
> + dw_spi_mask_intr(dws, DW_SPI_INT_MASK);
As I'm reasonably sure I said before this looks fairly obviously like
defensive programming intended to handle future versions of the IP that
define more mask bits sensibly.
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmqEj2IACgkQJNaLcl1U h9BrjAf/RmF2L5aWVBCQvCivbFoJBzdf7HmTKd14LJWfExaskeECoenSgcKNENrh u6gNEcCl8HxC5xZd3+fAfYNwDxLrkD/FGJ7atAhcbHDoZaXRBVkCP6PsY2+31USy fQ8QdOSGGonYOBYE0kUVFI4nA2yvSZahhy+b8gv4MVHi/9gxqkGz0hmh1E0hwzSY 49fjHtE8zcYBoJ4dW+xU0OqVreczhVpbbsThEJt9or+OAPkEfhG0rQAJKG/J40J+ jq2+7aaFZI/PjtRMj+oLuavwU8fgJk/cFJucMlqG/SR4nkMUEx1fyYJCgk75NoHt 2R7zVKOkyrzu1O4bl3id+bXju83etw== =D4X0 -----END PGP SIGNATURE-----