From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3A9DC282DD for ; Thu, 9 Jan 2020 16:54:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E86020721 for ; Thu, 9 Jan 2020 16:54:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AsTJYmqh"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="rNYxP1oi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E86020721 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X74fkWN4Fd3mrD2g7KVeHdqLbqT1oF99ci6VaJsAtmw=; b=AsTJYmqhwkEf79 79lpww969Aoz3apFlABAb2PNAqhrBJ2TRM3uT3ToQH15tuL9xTcU6PEB5nkSe8D/Q+bNvgMZbVtRM 8pNgz081oy6yj8ec9enR3Wx5Dbq7P18pgItjf4GWeEa3p6rM6gzEWVSUIG5YRwMdJrRfNUSqD5GMO b5lc/2iNI/I6DUAAytgRRDZEJG1fuxgr4FoS2FEKgKv4n+T0NMufpqv380t90p3NrJn9Vu7MhQYbQ xogiwJDfLlKUfpE0hcoVmtYHCSvh5EXUK8IThzHUfddPYwPLEgdgCsoegTItG00bZx28haUdtJV0U LcdyQy5CuGjw01OgMyhw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipb4Q-0002Hy-O3; Thu, 09 Jan 2020 16:54:06 +0000 Received: from perceval.ideasonboard.com ([2001:4b98:dc2:55:216:3eff:fef7:d647]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipb4M-0002Gp-Tw for linux-arm-kernel@lists.infradead.org; Thu, 09 Jan 2020 16:54:04 +0000 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C5D3F52F; Thu, 9 Jan 2020 17:53:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1578588839; bh=sOC8mik59yBJH+Ojdmaq5uVi1sLgq4RG29ymvZmJjzc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rNYxP1oi3fClt3LDl93WQ3Ybt5/HuHty+5P/KtrXWipsEjipStzncldV5Lnv8yY7V dXPT/rRRo9HGE6n9p2GqEXsV5fT/gbPwMVy5dP+Bw4GdDvHlxmB0vyBrbqMnTvhEL/ jTXO9KrEe06aGTp0a0YjBqU3DcGp3uwUcVo35U6Q= Date: Thu, 9 Jan 2020 18:53:48 +0200 From: Laurent Pinchart To: Peter Ujfalusi Subject: Re: [PATCH] media: xilinx: Use dma_request_chan() instead dma_request_slave_channel() Message-ID: <20200109165348.GG31792@pendragon.ideasonboard.com> References: <20191217104235.23771-1-peter.ujfalusi@ti.com> <20200109164847.GF31792@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200109164847.GF31792@pendragon.ideasonboard.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200109_085403_104814_CB30F3B4 X-CRM114-Status: GOOD ( 16.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hyun.kwon@xilinx.com, michal.simek@xilinx.com, linux-kernel@vger.kernel.org, vkoul@kernel.org, mchehab@kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello again, On Thu, Jan 09, 2020 at 06:48:47PM +0200, Laurent Pinchart wrote: > On Tue, Dec 17, 2019 at 12:42:35PM +0200, Peter Ujfalusi wrote: > > dma_request_slave_channel() is a wrapper on top of dma_request_chan() > > eating up the error code. > > > > By using dma_request_chan() directly the driver can support deferred > > probing against DMA. > > > > Signed-off-by: Peter Ujfalusi > > Reviewed-by: Laurent Pinchart > > Vinod, could you please pick this up ? I spoke too fast. > > --- > > drivers/media/platform/xilinx/xilinx-dma.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c > > index b211380a11f2..9ce515ff9c0a 100644 > > --- a/drivers/media/platform/xilinx/xilinx-dma.c > > +++ b/drivers/media/platform/xilinx/xilinx-dma.c > > @@ -725,10 +725,10 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma, > > > > /* ... and the DMA channel. */ > > snprintf(name, sizeof(name), "port%u", port); > > - dma->dma = dma_request_slave_channel(dma->xdev->dev, name); > > - if (dma->dma == NULL) { > > + dma->dma = dma_request_chan(dma->xdev->dev, name); > > + if (IS_ERR(dma->dma)) { > > dev_err(dma->xdev->dev, "no VDMA channel found\n"); > > - ret = -ENODEV; > > + ret = PTR_ERR(dma->dma); > > goto error; At the error label, we have error: xvip_dma_cleanup(dma); return ret; and xvip_dma_cleanup() contains if (dma->dma) dma_release_channel(dma->dma); You need to turn this into if (!IS_ERR_OR_NULL(dma->dma)) or add a dma->dma = NULL; in the error case in xvip_dma_init(). > > } > > -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel