Re: [PATCH v1] usb: storage: sddr09: move write buffers into info struct

From: Oliver Neukum
Date: Mon Sep 01 2025 - 04:10:37 EST


Hi,

On 8/31/25 21:22, Alex Tran wrote:
+static int sddr09_init_card_buffers(struct us_data *us)
+{
+ struct sddr09_card_info *info = (struct sddr09_card_info *)us->extra;
+ unsigned int pagelen, blocklen, len;
+
+ /*
+ * blockbuffer is used for reading in the old data, overwriting
+ * with the new data, and performing ECC calculations
+ */
+ pagelen = (1 << info->pageshift) + (1 << CONTROL_SHIFT);
+ blocklen = (pagelen << info->blockshift);
+ info->blockbuffer = kmalloc(blocklen, GFP_NOIO);

there is no reason for GFP_NOIO under these circumstances. Please
use GFP_KERNEL.

Regards
Oliver