[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1378999943-1968-2-git-send-email-murzin.v@gmail.com>
Date: Thu, 12 Sep 2013 17:32:21 +0200
From: Vladimir Murzin <murzin.v@...il.com>
To: linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Cc: coelho@...com, linville@...driver.com,
Vladimir Murzin <murzin.v@...il.com>
Subject: [PATCH 1/3] wlcore: fix frame size overflow warning in wl12xx_spi_raw_write
While cross-building for PPC64 I've got
drivers/net/wireless/ti/wlcore/spi.c: In function
'wl12xx_spi_raw_write': drivers/net/wireless/ti/wlcore/spi.c:317:1:
warning: the frame size of 9712 bytes is larger than 2048 bytes
[-Wframe-larger-than=]
WSPI_MAX_NUM_OF_CHUNKS depends on SPI_AGGR_BUFFER_SIZE which in turn
is based on PAGE_SIZE. For most systems PAGE_SIZE is stands for 4K,
but it may vary - in my case PAGE_SIZE is 64K.
Fix calculation by using 4K explicitly.
Signed-off-by: Vladimir Murzin <murzin.v@...il.com>
---
drivers/net/wireless/ti/wlcore/spi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c
index 1b0cd98..8dce028 100644
--- a/drivers/net/wireless/ti/wlcore/spi.c
+++ b/drivers/net/wireless/ti/wlcore/spi.c
@@ -70,7 +70,8 @@
* only support SPI for 12xx - this code should be reworked when 18xx
* support is introduced
*/
-#define SPI_AGGR_BUFFER_SIZE (4 * PAGE_SIZE)
+#define SPI_PAGE_SIZE 4096
+#define SPI_AGGR_BUFFER_SIZE (4 * SPI_PAGE_SIZE)
#define WSPI_MAX_NUM_OF_CHUNKS (SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE)
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists