Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2021158rdb; Sun, 19 Nov 2023 22:16:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IECEQkD5yIHA83dUiH9z6kb1k+8NAuVH0dXtYefHK5cYxnYSLyZUASolYHZA3Db5mc0Kpzz X-Received: by 2002:a9d:684a:0:b0:6c4:a036:cc1b with SMTP id c10-20020a9d684a000000b006c4a036cc1bmr6266268oto.35.1700460966310; Sun, 19 Nov 2023 22:16:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700460966; cv=none; d=google.com; s=arc-20160816; b=WuOzwj25BiHrZfSXzfbdruU7iwQx1eR1E3D0ebW40hCQn45cVqRZIzHqH5dRpsqdzM /0HByIkCNSE+V6reCZNUzOE1NputiOS+kenqTXAXDCs1vhhAcnKl5CpyJIhRVN8RYM1x RJalup9gkulM+TuVSXtwK6ag2MD1tiM3LH+g7mG7G72T+p2HrnFi2kLxpa7Mby+rdfOw s8sGCQGazKYg4Q2IpvuBpOPGERHw5W7L6k3jouPLBjhef7n+pjZ2LcFnPh+oii2luD8V zriKqHUampwvkLg1UH0fEk2XMvEvs6UoBpg5tqlP5Kr1EGU+V557nvCI8fePRwAsQZAQ MhvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=AbbQXlLM5rzQD/2Q3ynuAoYoACD7YY6nmC8tH95Lw5U=; fh=PfmfbVvNgpcXX91+BLGa6YsWGWr6tgJtAch66EcMqqU=; b=ZlMUSou+p/YWUdL8r4LiVccx0k8H7blJniYWnwdoSRUDV/EYVXAdHSJvEEsJ3k8M18 2JzpZJH7rAeMs9KJyCi7yo2RxfOzbHskQ8sv+KwMoSgan5QaMkmJozcc7heynhdbRo0Y W51pUgQ/NtBa4vflxaPZVFBCGW9QYK8FFewyqFFgScwKMxfvKtkt0spImrwB352mb2My AdPCp2hKaxeS/+IzqJ3SXwMJh+gnBvD9nhuDOaaMswhRR9/SSWUi5kSgIVoMYsv57y2k exdl8xe+RfDk0nDdvbWo8+F1eW+kfdtgJ86WqGUYg2am823ODfSklZUzrOrVqysKj2Eo rYAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=SXAvK+LU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id e14-20020a63ee0e000000b005bd0432d9b0si4735770pgi.100.2023.11.19.22.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 22:16:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b=SXAvK+LU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 2E8B0805FD7B; Sun, 19 Nov 2023 22:15:50 -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 S231966AbjKTGOk (ORCPT + 99 others); Mon, 20 Nov 2023 01:14:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231948AbjKTGOi (ORCPT ); Mon, 20 Nov 2023 01:14:38 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE889126 for ; Sun, 19 Nov 2023 22:14:34 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4084b0223ccso13182695e9.2 for ; Sun, 19 Nov 2023 22:14:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1700460873; x=1701065673; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=AbbQXlLM5rzQD/2Q3ynuAoYoACD7YY6nmC8tH95Lw5U=; b=SXAvK+LUHUvVNYrXHgMbByyw/BTUJAw81uk81cygdcxEhGOUsKTSIBX6SfBl3p0hTs ZO4vjYCtfNs5Ykpl7RqdN4lrahN1jBV3SNNzlXQcjRwDwguCfWn+wsxBgIZcmodFVKwE 50vcQsK4xPfcpQ1o1o3iEFoyRK6vz1GZL3Ib1DC9/3zK5zhxk2n7R0LtvcxlVNv75FtQ hlPCnCfDJJChREmjJieIZ7LwrACSYhOXOkRBi1pARpB9Ip/r9+FoDdtezCxfGZ2zszat 4iQdivC8zZOYnA13Fy1ryVzJDRsMR2LlSoM7TGEYsgdIfYgkbIZtHC3pJxrLd/JVi8qt rrhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700460873; x=1701065673; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AbbQXlLM5rzQD/2Q3ynuAoYoACD7YY6nmC8tH95Lw5U=; b=oTMjB8MuA84Z1LCVPusEMbNUugbBs9bWMjPRlavzto8bi1+DrzdzY8GV/ff9c3Mlio KJjjWffQaVPvnrKmfXkdDKm0n3Jb4b2FTllqKQCHMXoniFMTrsdVpORQJ0etSY2w39Jt NYjEcOMhPMojuKFMwT2ouPcM5XGmRnlre8/Iv0tuMa4eHzEAekJyAv5F926RRkBqM/BH ygoWM5QV2FLhNeY5e7Hn+xByLl121ABMt18fZKILPw8Afo9Mj4ZAHS57A5cqASQ3NOuZ 3OwIKLBoUkj9OlSqI5VoOWIvbtbdAl0ewj04PibvV1asRevDJRr5Qd8kRFL/tTN9j1Fh ibxQ== X-Gm-Message-State: AOJu0YwD20DiYKBGYRIqJVJGf4L/08ZJx+NN0JBLjXQYbfL+jXTpeMMF vc+g/s/6vfGie0rvjoLF1LPHJg== X-Received: by 2002:a05:600c:3c9b:b0:40a:3e41:7dd8 with SMTP id bg27-20020a05600c3c9b00b0040a3e417dd8mr4698567wmb.13.1700460872980; Sun, 19 Nov 2023 22:14:32 -0800 (PST) Received: from [192.168.50.4] ([82.78.167.183]) by smtp.gmail.com with ESMTPSA id n27-20020a05600c3b9b00b00405959469afsm12486333wms.3.2023.11.19.22.14.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Nov 2023 22:14:32 -0800 (PST) Message-ID: Date: Mon, 20 Nov 2023 08:14:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] serial: atmel: convert not to use dma_request_slave_channel() Content-Language: en-US To: Christophe JAILLET , Richard Genoud , Greg Kroah-Hartman , Jiri Slaby , Nicolas Ferre , Alexandre Belloni Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: From: claudiu beznea In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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]); Sun, 19 Nov 2023 22:15:50 -0800 (PST) Hi, Christophe, On 19.11.2023 17:55, Christophe JAILLET wrote: > 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; There is no need for this. > 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; Ditto > 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)); >