From nobody Sun May 24 19:35:20 2026 Received: from twmbx01.aspeedtech.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2DE838D3EC; Fri, 22 May 2026 07:16:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779434188; cv=none; b=e26BKH1kxYHewuigmHDRGfaN89hTJHE1vPsVN9BhZR1C2lQS9n08MIbOQRJTp93PNlLX21kmZ1piRWiKclHgu16Jp467NzMTPHSgVf5AUSQTa7ydugxqmlqpKtVjLmZ4QjdJDXnZ6PjOtqsxBhssIxAtfT/6dsIxLidjg4Veonk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779434188; c=relaxed/simple; bh=hMBcOM1/OqfvNnx5ajZIKg705UJUF+N3Ef6OReB5HBo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PhPNjUFL78ZwoB3QrP3dpquXT9bAZ8WbEPY6kZu8W4vffR6bsjWtgw/D5ctyx3tEaothHtLRyCMXklgnPKdKtGkiBZDFp7LeRi2F/JFD20N6tq2nIsuXAjMnG9M/olGJ1l310CiNqUYFJQ0NI+SqOg6F5LXeWVqg9HI021X8G/4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Fri, 22 May 2026 15:16:21 +0800 Received: from aspeedtech.com (192.168.10.13) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Fri, 22 May 2026 15:16:21 +0800 From: Chin-Ting Kuo To: , , , , , , , , , , CC: kernel test robot Subject: [PATCH v2 1/2] spi: aspeed: Fix missing __iomem annotation in output transfer path Date: Fri, 22 May 2026 15:16:20 +0800 Message-ID: <20260522071621.102507-2-chin-ting_kuo@aspeedtech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260522071621.102507-1-chin-ting_kuo@aspeedtech.com> References: <20260522071621.102507-1-chin-ting_kuo@aspeedtech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The dst parameter of aspeed_spi_user_transfer_tx() is an MMIO address obtained from chip->ahb_base, but it was typed as void * instead of void __iomem *. This caused a sparse warning report. Fix the parameter type to void __iomem * and drop the now-unnecessary cast at the call site. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202605180441.uD3toFRJ-lkp@int= el.com/ Signed-off-by: Chin-Ting Kuo Reviewed-by: C=C3=A9dric Le Goater --- drivers/spi/spi-aspeed-smc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-aspeed-smc.c b/drivers/spi/spi-aspeed-smc.c index c21323e07d3c..808659a1f460 100644 --- a/drivers/spi/spi-aspeed-smc.c +++ b/drivers/spi/spi-aspeed-smc.c @@ -891,7 +891,7 @@ static int aspeed_spi_user_unprepare_msg(struct spi_con= troller *ctlr, static void aspeed_spi_user_transfer_tx(struct aspeed_spi *aspi, struct spi_device *spi, const u8 *tx_buf, u8 *rx_buf, - void *dst, u32 len) + void __iomem *dst, u32 len) { const struct aspeed_spi_data *data =3D aspi->data; bool full_duplex_transfer =3D data->full_duplex && tx_buf =3D=3D rx_buf; @@ -936,7 +936,7 @@ static int aspeed_spi_user_transfer(struct spi_controll= er *ctlr, aspeed_spi_set_io_mode(chip, CTRL_IO_QUAD_DATA); =20 aspeed_spi_user_transfer_tx(aspi, spi, tx_buf, rx_buf, - (void *)ahb_base, xfer->len); + ahb_base, xfer->len); } =20 if (rx_buf && rx_buf !=3D tx_buf) { --=20 2.34.1 From nobody Sun May 24 19:35:20 2026 Received: from twmbx01.aspeedtech.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8983B38E8C5; Fri, 22 May 2026 07:16:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779434196; cv=none; b=bCwGj4g9oS8l8+Z8MksZliI0mWCPPCzNlzB774CarGlr4Dw0s8lKpDsxj/skcYEVfq9TN2LVLawk2gt9PoTHWROyWVcFRmik/XGnKpEAZzyH8we653to14l2ElIex50Vc0ThvOnrQ4De9lBNOeL4OF2/MjovUqsNhpSZyUEeYwk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779434196; c=relaxed/simple; bh=YE3+4tOwU8pg0VTtcTwjReAYrzSP06ELupdbffnK1eU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PpfNjUREAH9RCnzIsqIthpXIzHjs6dZwRRmg/K/GeoxB4HdzMbqyiYXATIu+hNcX/uywb5CF/tO/944xK072X7tts8eoVUARGOZsb/AAkFsbpHxDp0/cf+VXTPkxMWCLG6pB40VNkjKmL4jtPEJ8fXdeWXjuF2k+feg5exdCOxA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Fri, 22 May 2026 15:16:21 +0800 Received: from aspeedtech.com (192.168.10.13) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Fri, 22 May 2026 15:16:21 +0800 From: Chin-Ting Kuo To: , , , , , , , , , , CC: kernel test robot Subject: [PATCH v2 2/2] spi: aspeed: Replace VLA parameter with flat pointer in calibration helper Date: Fri, 22 May 2026 15:16:21 +0800 Message-ID: <20260522071621.102507-3-chin-ting_kuo@aspeedtech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260522071621.102507-1-chin-ting_kuo@aspeedtech.com> References: <20260522071621.102507-1-chin-ting_kuo@aspeedtech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable aspeed_spi_ast2600_optimized_timing() declared its buffer argument as a variable-length array parameter (u8 buf[rows][cols]), which causes a sparse warning. Replace the VLA parameter with a plain u8 * and compute the 2-D index manually. The corresponding call site is also updated. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202605180441.uD3toFRJ-lkp@int= el.com/ Signed-off-by: Chin-Ting Kuo Reviewed-by: C=C3=A9dric Le Goater --- drivers/spi/spi-aspeed-smc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-aspeed-smc.c b/drivers/spi/spi-aspeed-smc.c index 808659a1f460..027caa2eeb5c 100644 --- a/drivers/spi/spi-aspeed-smc.c +++ b/drivers/spi/spi-aspeed-smc.c @@ -1467,8 +1467,7 @@ static int aspeed_spi_do_calibration(struct aspeed_sp= i_chip *chip) * must contains the highest number of consecutive "pass" * results and not span across multiple rows. */ -static u32 aspeed_spi_ast2600_optimized_timing(u32 rows, u32 cols, - u8 buf[rows][cols]) +static u32 aspeed_spi_ast2600_optimized_timing(u32 rows, u32 cols, u8 *buf) { int r =3D 0, c =3D 0; int max =3D 0; @@ -1478,7 +1477,7 @@ static u32 aspeed_spi_ast2600_optimized_timing(u32 ro= ws, u32 cols, for (j =3D 0; j < cols;) { int k =3D j; =20 - while (k < cols && buf[i][k]) + while (k < cols && buf[(i * cols) + k]) k++; =20 if (k - j > max) { @@ -1541,7 +1540,7 @@ static int aspeed_spi_ast2600_calibrate(struct aspeed= _spi_chip *chip, u32 hdiv, } } =20 - calib_point =3D aspeed_spi_ast2600_optimized_timing(6, 17, calib_res); + calib_point =3D aspeed_spi_ast2600_optimized_timing(6, 17, &calib_res[0][= 0]); /* No good setting for this frequency */ if (calib_point =3D=3D 0) return -1; --=20 2.34.1