From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Subject: Re: [PATCH v4 1/2] i2c: add DMA support for freescale i2c driver Date: Fri, 4 Apr 2014 13:49:07 +0200 Message-ID: <201404041349.07721.marex@denx.de> References: <1396579272-19542-1-git-send-email-yao.yuan@freescale.com> <1396579272-19542-2-git-send-email-yao.yuan@freescale.com> <533E8033.70904@ti.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <533E8033.70904-l0cyMroinI0@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: sourav Cc: Yuan Yao , wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-i2c@vger.kernel.org On Friday, April 04, 2014 at 11:49:39 AM, sourav wrote: [...] > > +/* Functions for DMA support */ > > +static int i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx, > > + dma_addr_t phy_addr) > > +{ > > + struct imx_i2c_dma *dma; > > + struct dma_slave_config dma_sconfig; > > + struct device *dev =&i2c_imx->adapter.dev; > > + int ret; > > + > > + dma = devm_kzalloc(dev, sizeof(struct imx_i2c_dma), GFP_KERNEL); > > + if (!dma) { > > + dev_info(dev, "can't allocate DMA struct\n"); > > + return -ENOMEM; > > + } > > + > > + dma->chan_tx = dma_request_slave_channel(dev, "tx"); > > + return 0; > > ?? Looks to be some leftover? Nice find. btw. you might want to trim the email only to the relevant parts when replying so it's easier to find your commments in the entire body of text. > > + if (!dma->chan_tx) { > > + dev_info(dev, "DMA tx channel request failed\n"); > > + ret = -ENODEV; > > + goto fail_al; > > + } [...] Best regards, Marek Vasut From mboxrd@z Thu Jan 1 00:00:00 1970 From: marex@denx.de (Marek Vasut) Date: Fri, 4 Apr 2014 13:49:07 +0200 Subject: [PATCH v4 1/2] i2c: add DMA support for freescale i2c driver In-Reply-To: <533E8033.70904@ti.com> References: <1396579272-19542-1-git-send-email-yao.yuan@freescale.com> <1396579272-19542-2-git-send-email-yao.yuan@freescale.com> <533E8033.70904@ti.com> Message-ID: <201404041349.07721.marex@denx.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Friday, April 04, 2014 at 11:49:39 AM, sourav wrote: [...] > > +/* Functions for DMA support */ > > +static int i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx, > > + dma_addr_t phy_addr) > > +{ > > + struct imx_i2c_dma *dma; > > + struct dma_slave_config dma_sconfig; > > + struct device *dev =&i2c_imx->adapter.dev; > > + int ret; > > + > > + dma = devm_kzalloc(dev, sizeof(struct imx_i2c_dma), GFP_KERNEL); > > + if (!dma) { > > + dev_info(dev, "can't allocate DMA struct\n"); > > + return -ENOMEM; > > + } > > + > > + dma->chan_tx = dma_request_slave_channel(dev, "tx"); > > + return 0; > > ?? Looks to be some leftover? Nice find. btw. you might want to trim the email only to the relevant parts when replying so it's easier to find your commments in the entire body of text. > > + if (!dma->chan_tx) { > > + dev_info(dev, "DMA tx channel request failed\n"); > > + ret = -ENODEV; > > + goto fail_al; > > + } [...] Best regards, Marek Vasut From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752545AbaDDMnC (ORCPT ); Fri, 4 Apr 2014 08:43:02 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:51018 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751996AbaDDMm6 (ORCPT ); Fri, 4 Apr 2014 08:42:58 -0400 X-Auth-Info: ziSxuI7WXGZJMSQdFtxwt6Eoqdf7RCLy9f04x0A2lFI= From: Marek Vasut To: sourav Subject: Re: [PATCH v4 1/2] i2c: add DMA support for freescale i2c driver Date: Fri, 4 Apr 2014 13:49:07 +0200 User-Agent: KMail/1.13.7 (Linux/3.13-trunk-amd64; KDE/4.11.3; x86_64; ; ) Cc: Yuan Yao , wsa@the-dreams.de, mark.rutland@arm.com, shawn.guo@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org References: <1396579272-19542-1-git-send-email-yao.yuan@freescale.com> <1396579272-19542-2-git-send-email-yao.yuan@freescale.com> <533E8033.70904@ti.com> In-Reply-To: <533E8033.70904@ti.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201404041349.07721.marex@denx.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, April 04, 2014 at 11:49:39 AM, sourav wrote: [...] > > +/* Functions for DMA support */ > > +static int i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx, > > + dma_addr_t phy_addr) > > +{ > > + struct imx_i2c_dma *dma; > > + struct dma_slave_config dma_sconfig; > > + struct device *dev =&i2c_imx->adapter.dev; > > + int ret; > > + > > + dma = devm_kzalloc(dev, sizeof(struct imx_i2c_dma), GFP_KERNEL); > > + if (!dma) { > > + dev_info(dev, "can't allocate DMA struct\n"); > > + return -ENOMEM; > > + } > > + > > + dma->chan_tx = dma_request_slave_channel(dev, "tx"); > > + return 0; > > ?? Looks to be some leftover? Nice find. btw. you might want to trim the email only to the relevant parts when replying so it's easier to find your commments in the entire body of text. > > + if (!dma->chan_tx) { > > + dev_info(dev, "DMA tx channel request failed\n"); > > + ret = -ENODEV; > > + goto fail_al; > > + } [...] Best regards, Marek Vasut