Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2360190rdb; Mon, 20 Nov 2023 08:52:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IELYfG8fdLNPby66ADu73+AatEUgZy7UpisReQLeJCyWuq0v63ZGX/jZLpNBfn5yXcGAAeN X-Received: by 2002:a05:6a00:3a12:b0:6c3:1c74:9c5 with SMTP id fj18-20020a056a003a1200b006c31c7409c5mr9840317pfb.0.1700499165010; Mon, 20 Nov 2023 08:52:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700499164; cv=none; d=google.com; s=arc-20160816; b=X/MJKpCIUh3SNPI+cPU5a2Jd+0iOo6gKNQO/wOzySJV0oqBuA7k3k+ZsTB63OytR4L ccToOe4uLXYMRl1gBzLP9FmhzbuX4mFHl4dSoEd85qQNCuH+/2hmbJS7ij8LKhM6241y VJhYqjMvYdrb+L5LOMVjAHTfKwdLGPxQxJ71afdHHY07LhKln2rgbncQj5zt1H9JMIaU e1IUMoTQbx4puFXkKc9aaJ/Y2vY60jYRKAXfiG2nZI4+/J18JShM5XGGEWQAt895p+QQ 6vNdMcxSV6mbHrJsK0+P6QL/y/2Yrbqw6YUp4P2dJK7IfE6D8GHuC/tOyByaAOZ5nHy8 f2TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:from:date:dkim-signature; bh=IEmqZPNEHiRj9re2F4iCenA7GeqZoGYK1eYZxhU0tA4=; fh=dV922WqQWwWdTqAE0g8gkb7fOt/KYnvALNWl8KlbdJ8=; b=bP57m9S7ohip5mcLoPepqypxkva24l4CS+CpixSDAbKTr0uAVjTemmCLfb+4v1x/CC 6mK8jK/zGm1+i1+fpInQqiD3iRqmFI/gOsA1x87Wfhil17jnzqYcROC5KhIdnwl3Jmwl B4wYu3s78Ps0cXZ2ohmRWSBRCIWg7dSt+jQhfdtC49fvV63abbZ9tgeoc7dqfelVnoa8 HHnNEJ05hbYRd4fPKQOg+DAQYsREidN9Lurfds5kOJPU5OotfNoawuMWrm9Tz/smoqYL 96fVEJn18HR96/0+um3FhMfIGUCsswt2hh25b9JQUfbqmj0YkwRUPQjnGHkLdCQq10Hi SQAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b="bp/7xqTW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id j16-20020a634a50000000b005a0737404a7si8445019pgl.258.2023.11.20.08.52.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 08:52:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b="bp/7xqTW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id F292080A87DE; Mon, 20 Nov 2023 08:52:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233238AbjKTQwI (ORCPT + 99 others); Mon, 20 Nov 2023 11:52:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231444AbjKTQwH (ORCPT ); Mon, 20 Nov 2023 11:52:07 -0500 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE2DBBA; Mon, 20 Nov 2023 08:52:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:Mime-Version:Message-Id:Cc:To:From :Date:subject:date:message-id:reply-to; bh=IEmqZPNEHiRj9re2F4iCenA7GeqZoGYK1eYZxhU0tA4=; b=bp/7xqTWwBpASz6lw0QLmHwfKa nbLaNxx6zUa49+0GkKPCOz6bL/SGXVNBlUbiCFhawFla2zuB+XUkafOCRl8OqtJMErw2aiihhNHw5 apeF4CXyT/Qhl0dJ9DqLblIcrZkNK04vhBRgD/0vop+i1u4tBGBxEL1E8VSTQ9Awzrtk=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:55666 helo=pettiford) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1r57V2-00009x-Lj; Mon, 20 Nov 2023 11:51:53 -0500 Date: Mon, 20 Nov 2023 11:51:52 -0500 From: Hugo Villeneuve To: Christophe JAILLET Cc: Richard Genoud , Greg Kroah-Hartman , Jiri Slaby , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Message-Id: <20231120115152.77214ee015e6c501e500b22a@hugovil.com> In-Reply-To: References: X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 70.80.174.168 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email X-Spam-Level: X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_CSS autolearn=unavailable autolearn_force=no version=3.4.6 Subject: Re: [PATCH v2] serial: atmel: convert not to use dma_request_slave_channel() X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 08:52:28 -0800 (PST) On Sun, 19 Nov 2023 16:55:15 +0100 Christophe JAILLET wrote: Hi, change the subject to: "... replace deprecated dma_request_slave_channel()" Hugo. > dma_request_slave_channel() is deprecated. dma_request_chan() should > be used directly instead. > > Switch to the preferred function and update the error handling accordingly. > > Signed-off-by: Christophe JAILLET > --- > v2: Also update atmel_prepare_rx_dma() > --- > drivers/tty/serial/atmel_serial.c | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c > index 1946fafc3f3e..6aeb4648843b 100644 > --- a/drivers/tty/serial/atmel_serial.c > +++ b/drivers/tty/serial/atmel_serial.c > @@ -1013,14 +1013,18 @@ static int atmel_prepare_tx_dma(struct uart_port *port) > struct device *mfd_dev = port->dev->parent; > dma_cap_mask_t mask; > struct dma_slave_config config; > + struct dma_chan *chan; > int ret, nent; > > dma_cap_zero(mask); > dma_cap_set(DMA_SLAVE, mask); > > - atmel_port->chan_tx = dma_request_slave_channel(mfd_dev, "tx"); > - if (atmel_port->chan_tx == NULL) > + chan = dma_request_chan(mfd_dev, "tx"); > + if (IS_ERR(chan)) { > + atmel_port->chan_tx = NULL; > goto chan_err; > + } > + atmel_port->chan_tx = chan; > dev_info(port->dev, "using %s for tx DMA transfers\n", > dma_chan_name(atmel_port->chan_tx)); > > @@ -1188,6 +1192,7 @@ static int atmel_prepare_rx_dma(struct uart_port *port) > dma_cap_mask_t mask; > struct dma_slave_config config; > struct circ_buf *ring; > + struct dma_chan *chan; > int ret, nent; > > ring = &atmel_port->rx_ring; > @@ -1195,9 +1200,12 @@ static int atmel_prepare_rx_dma(struct uart_port *port) > dma_cap_zero(mask); > dma_cap_set(DMA_CYCLIC, mask); > > - atmel_port->chan_rx = dma_request_slave_channel(mfd_dev, "rx"); > - if (atmel_port->chan_rx == NULL) > + chan = dma_request_chan(mfd_dev, "rx"); > + if (IS_ERR(chan)) { > + atmel_port->chan_rx = NULL; > goto chan_err; > + } > + atmel_port->chan_rx = chan; > dev_info(port->dev, "using %s for rx DMA transfers\n", > dma_chan_name(atmel_port->chan_rx)); > > -- > 2.34.1 >