Message ID | 4a1559fc9c5d1fec91f1ac5d425871b5.broonie@kernel.org |
---|---|
State | New |
Headers | show |
Series | [GIT,PULL] SPI updates for v6.16 | expand |
On Mon, 26 May 2025 at 03:30, Mark Brown <broonie@kernel.org> wrote: > > Raju Rangoju (4): > spi: spi_amd: Add PCI-based driver for AMD HID2 SPI controller > spi: spi_amd: Remove read{q,b} usage on DMA buffer > spi: spi_amd: Add HIDDMA basic write support > spi: spi_amd: Update Kconfig dependencies So the Kconfig changes made me look at this, and this is just *odd*. The driver stops using read{q,b}, but why in the name of everything holy did it then convert to this insanity: u64 *buf_64 = (u64 *)op->data.buf.in; [...] u64 *dma_buf64 = (u64 *)amd_spi->dma_virt_addr; [...] /* Copy data from DMA buffer */ while (left_data >= 8) { *buf_64++ = *dma_buf64++; left_data -= 8; } buf = (u8 *)buf_64; dma_buf = (u8 *)dma_buf64; while (left_data--) *buf++ = *dma_buf++; which simply seems to be a really stupid and over-complicated way to write a regular memory copy: memcpy(op->data.buf.in, amd_spi->dma_virt_addr, nbytes); because I'm not seeing what the point of writing it that way is. Linus
The pull request you sent on Mon, 26 May 2025 11:30:17 +0100:
> https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git tags/spi-v6.16
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/5722a6cecfff3e381b96bbbd7e9b3911731e80d9
Thank you!