Re: [PATCH] eeprom: at25: convert to spi-mem API

From: Christophe Leroy
Date: Sat Nov 08 2025 - 06:20:43 EST


Hi Again,

Le 08/11/2025 à 11:05, Christophe Leroy a écrit :
Hi Alexander,

Now I'm trying to understand why the problem surfaced with commit 8ad6249c51d0 ("eeprom: at25: convert to spi-mem API")


The reason why it was not a problem before was that the transfer was done into of->prealloc_buf (fs/kernfs/file.c) which is a kmalloc() with size (PAGE_SIZE + 1).

Following the rework of at25 it now goes into the bounce buffer which is allocated with the exact size of the transfer.

Why do we need an intermediate bounce buffer now, why can't of->prealloc_buf be used directly as before ?

Christophe