summaryrefslogtreecommitdiffstats
path: root/drivers/staging/pi433/pi433_if.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-07-31 10:57:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-14 17:43:14 -0700
commit62f39d49d168fcb405b833f3f864d49a01017ad9 (patch)
treec4dcd594453b25b7cbd480ec63a883310a1395d0 /drivers/staging/pi433/pi433_if.c
parent125a452cdf2f48d74db29e39f02e030d2c88fe62 (diff)
downloadop-kernel-dev-62f39d49d168fcb405b833f3f864d49a01017ad9.zip
op-kernel-dev-62f39d49d168fcb405b833f3f864d49a01017ad9.tar.gz
staging: pi433: reduce stack size in tx thread
Putting a 900 byte array on the stack is a clearly too much in the kernel, and sometimes results in warnings like: drivers/staging/pi433/pi433_if.c: In function 'pi433_tx_thread': drivers/staging/pi433/pi433_if.c:645:1: error: the frame size of 1028 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] This moves the buffer into the dynamically allocated per-device structure. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Marcus Wolf <linux@wolf-entwicklungen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/pi433/pi433_if.c')
-rw-r--r--drivers/staging/pi433/pi433_if.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 6588a50..6b9b7df 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -92,6 +92,7 @@ struct pi433_device {
struct task_struct *tx_task_struct;
wait_queue_head_t tx_wait_queue;
u8 free_in_fifo;
+ char buffer[MAX_MSG_SIZE];
/* rx related values */
struct pi433_rx_cfg rx_cfg;
@@ -490,7 +491,7 @@ pi433_tx_thread(void *data)
struct pi433_device *device = data;
struct spi_device *spi = device->spi; /* needed for SET_CHECKED */
struct pi433_tx_cfg tx_cfg;
- u8 buffer[MAX_MSG_SIZE];
+ u8 *buffer = device->buffer;
size_t size;
bool rx_interrupted = false;
int position, repetitions;
OpenPOWER on IntegriCloud