From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752542AbdFZMu5 convert rfc822-to-8bit (ORCPT ); Mon, 26 Jun 2017 08:50:57 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:14849 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752487AbdFZMuv (ORCPT ); Mon, 26 Jun 2017 08:50:51 -0400 From: Bich HEMON To: Greg Kroah-Hartman , Rob Herring , Mark Rutland , Maxime Coquelin , Alexandre TORGUE , "Jiri Slaby" , "linux-serial@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" CC: Bich HEMON Subject: [PATCH 07/20] serial: stm32: less messages on dma alloc error Thread-Topic: [PATCH 07/20] serial: stm32: less messages on dma alloc error Thread-Index: AQHS7nqb2QmlHxp4/k6rVMV3rD/FKA== Date: Mon, 26 Jun 2017 12:49:11 +0000 Message-ID: <1498481318-1894-8-git-send-email-bich.hemon@st.com> References: <1498481318-1894-1-git-send-email-bich.hemon@st.com> In-Reply-To: <1498481318-1894-1-git-send-email-bich.hemon@st.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.50] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-26_09:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bich Hemon Just display one info (instead of two) in the log buffer when there is no dma. Signed-off-by: Gerald Baeza --- drivers/tty/serial/stm32-usart.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 79ac167..dcc6d1e 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -786,10 +786,8 @@ static int stm32_of_dma_rx_probe(struct stm32_port *stm32port, /* Request DMA RX channel */ stm32port->rx_ch = dma_request_slave_channel(dev, "rx"); - if (!stm32port->rx_ch) { - dev_info(dev, "rx dma alloc failed\n"); + if (!stm32port->rx_ch) return -ENODEV; - } stm32port->rx_buf = dma_alloc_coherent(&pdev->dev, RX_BUF_L, &stm32port->rx_dma_buf, GFP_KERNEL); @@ -858,10 +856,8 @@ static int stm32_of_dma_tx_probe(struct stm32_port *stm32port, /* Request DMA TX channel */ stm32port->tx_ch = dma_request_slave_channel(dev, "tx"); - if (!stm32port->tx_ch) { - dev_info(dev, "tx dma alloc failed\n"); + if (!stm32port->tx_ch) return -ENODEV; - } stm32port->tx_buf = dma_alloc_coherent(&pdev->dev, TX_BUF_L, &stm32port->tx_dma_buf, GFP_KERNEL); -- 1.9.1