Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751865AbdGEOYt (ORCPT ); Wed, 5 Jul 2017 10:24:49 -0400 Received: from imap0.codethink.co.uk ([185.43.218.159]:51663 "EHLO imap0.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678AbdGEOYr (ORCPT ); Wed, 5 Jul 2017 10:24:47 -0400 Message-ID: <1499264677.1935.91.camel@codethink.co.uk> Subject: Re: [PATCH 4.4 071/101] spi: davinci: use dma_mapping_error() From: Ben Hutchings To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Kevin Hilman , Mark Brown , Sasha Levin Date: Wed, 05 Jul 2017 15:24:37 +0100 In-Reply-To: <20170703133346.376540288@linuxfoundation.org> References: <20170703133334.237346187@linuxfoundation.org> <20170703133346.376540288@linuxfoundation.org> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1376 Lines: 48 On Mon, 2017-07-03 at 15:35 +0200, Greg Kroah-Hartman wrote: > 4.4-stable review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Kevin Hilman > > > [ Upstream commit c5a2a394835f473ae23931eda5066d3771d7b2f8 ] > > The correct error checking for dma_map_single() is to use > dma_mapping_error(). > > Signed-off-by: Kevin Hilman > Signed-off-by: Mark Brown > Signed-off-by: Sasha Levin > Signed-off-by: Greg Kroah-Hartman > --- > drivers/spi/spi-davinci.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > --- a/drivers/spi/spi-davinci.c > +++ b/drivers/spi/spi-davinci.c > @@ -651,7 +651,7 @@ static int davinci_spi_bufs(struct spi_d > buf = t->rx_buf; > t->rx_dma = dma_map_single(&spi->dev, buf, > t->len, DMA_FROM_DEVICE); > - if (!t->rx_dma) { > + if (dma_mapping_error(&spi->dev, !t->rx_dma)) { [...] The '!' needs to be deleted. This appears to have been fixed upstream by: commit 8aedbf580d21121d2a032e4c8ea12d8d2d85e275 Author: Fabien Parent Date: Thu Feb 23 19:01:56 2017 +0100 spi: davinci: Use SPI framework to handle DMA mapping which is not suitable for stable. Ben. -- Ben Hutchings Software Developer, Codethink Ltd.