提交 1faba2d8 编写于 作者: L Lee Jones 提交者: Zheng Zengkai

tty: serial: stm32-usart: Remove set but unused 'cookie' variables

stable inclusion
from stable-5.10.26
commit 5f8659adf7a2889acf9d105d579efa6ed4033993
bugzilla: 51363

--------------------------------

[ Upstream commit 24832ca3 ]

Fixes the following W=1 kernel build warning(s):

 drivers/tty/serial/stm32-usart.c: In function ‘stm32_transmit_chars_dma’:
 drivers/tty/serial/stm32-usart.c:353:15: warning: variable ‘cookie’ set but not used [-Wunused-but-set-variable]
 drivers/tty/serial/stm32-usart.c: In function ‘stm32_of_dma_rx_probe’:
 drivers/tty/serial/stm32-usart.c:1090:15: warning: variable ‘cookie’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Gerald Baeza <gerald.baeza@st.com>
Cc: linux-serial@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Signed-off-by: NLee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20201104193549.4026187-29-lee.jones@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: N  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 d0889b2c
...@@ -350,7 +350,6 @@ static void stm32_transmit_chars_dma(struct uart_port *port) ...@@ -350,7 +350,6 @@ static void stm32_transmit_chars_dma(struct uart_port *port)
struct stm32_usart_offsets *ofs = &stm32port->info->ofs; struct stm32_usart_offsets *ofs = &stm32port->info->ofs;
struct circ_buf *xmit = &port->state->xmit; struct circ_buf *xmit = &port->state->xmit;
struct dma_async_tx_descriptor *desc = NULL; struct dma_async_tx_descriptor *desc = NULL;
dma_cookie_t cookie;
unsigned int count, i; unsigned int count, i;
if (stm32port->tx_dma_busy) if (stm32port->tx_dma_busy)
...@@ -394,7 +393,7 @@ static void stm32_transmit_chars_dma(struct uart_port *port) ...@@ -394,7 +393,7 @@ static void stm32_transmit_chars_dma(struct uart_port *port)
desc->callback_param = port; desc->callback_param = port;
/* Push current DMA TX transaction in the pending queue */ /* Push current DMA TX transaction in the pending queue */
cookie = dmaengine_submit(desc); dmaengine_submit(desc);
/* Issue pending DMA TX requests */ /* Issue pending DMA TX requests */
dma_async_issue_pending(stm32port->tx_ch); dma_async_issue_pending(stm32port->tx_ch);
...@@ -1087,7 +1086,6 @@ static int stm32_of_dma_rx_probe(struct stm32_port *stm32port, ...@@ -1087,7 +1086,6 @@ static int stm32_of_dma_rx_probe(struct stm32_port *stm32port,
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct dma_slave_config config; struct dma_slave_config config;
struct dma_async_tx_descriptor *desc = NULL; struct dma_async_tx_descriptor *desc = NULL;
dma_cookie_t cookie;
int ret; int ret;
/* Request DMA RX channel */ /* Request DMA RX channel */
...@@ -1132,7 +1130,7 @@ static int stm32_of_dma_rx_probe(struct stm32_port *stm32port, ...@@ -1132,7 +1130,7 @@ static int stm32_of_dma_rx_probe(struct stm32_port *stm32port,
desc->callback_param = NULL; desc->callback_param = NULL;
/* Push current DMA transaction in the pending queue */ /* Push current DMA transaction in the pending queue */
cookie = dmaengine_submit(desc); dmaengine_submit(desc);
/* Issue pending DMA requests */ /* Issue pending DMA requests */
dma_async_issue_pending(stm32port->rx_ch); dma_async_issue_pending(stm32port->rx_ch);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册