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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2AB4C5AD4C for ; Mon, 20 Nov 2023 07:13:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232086AbjKTHNI (ORCPT ); Mon, 20 Nov 2023 02:13:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232034AbjKTHNF (ORCPT ); Mon, 20 Nov 2023 02:13:05 -0500 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABDE990 for ; Sun, 19 Nov 2023 23:13:01 -0800 (PST) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-50aab3bf71fso1282980e87.3 for ; Sun, 19 Nov 2023 23:13:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1700464380; x=1701069180; 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=wLaWQRdfr6nMXYi7OACSu7/8cprPzA6DbFJtJv63SGI=; b=bhRTW9ZrHM0RzAcHbQyMaZfux5E72+Ag+0SrZKQhkGWe6dnziCmxPDxsVzNogxYp1p Q4UJZ1bC9ImHvK+f/caoxlsJvH0N3iis2wAn2+jq+EhjoeAfYj8V46J0muRpLT/lmeni ElXMUEU/ZIgA6wiXguOYZxoI4FeD0EvlWiL6Adz3SKVhGKQkkWUTq82LbPHoXHaSNLpj MTNBW0K3/ZKFP4Rg6zV0bdlO9HydRoHfCSqrVll4Wa6peswsXOU7DX+p4J2QSYwkXQ+0 VJuVdVMJG0+qWWNPJMYaTyFjXdpF2I1Q2fT/KaBZfweLOmyNeuEqUddk2A7c28+UCYJm LrWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700464380; x=1701069180; 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=wLaWQRdfr6nMXYi7OACSu7/8cprPzA6DbFJtJv63SGI=; b=vdvpMGfoEWn3duJMvTcPuwj4GWf3QcHa79DEAArpoXUrYCjRzeBWKYX+36b30MdUxl QIelspjSIIFoY2+hxQKolOQXuilnt8HEZZSOKitprMEwJ4vTnNRoMv0sIGHgv54Iw5lj NnWl8Z4QvkkTFXG3inoIOqnDoJZ9FZz8BFEBZVoaf90hqPgPYlThNL2PIRa6+lLIHyJg e87dLyr8ZLz842DwCNqcFlzHfht4uasHwVVrSSjOGZLl2ImiStAqQHXekTCy/yPj7bbp k1g47FyhvMHqAjAx6v/zYYZ5pyGz3ILr9HIYPWyns2Qmc9r/sMIM6vKnr8x1Py5HeSLA 03Sg== X-Gm-Message-State: AOJu0Yx0Tsnkk4gzOp+DhpJPfZYHA5U/K9kejZILpMa/cNrU+CxCV/Ek i+GfcbtNSmFzvcJFb16G3++2yg== X-Google-Smtp-Source: AGHT+IHHFMPQE7uzRJ7hggvhdnwod6oYenlYn43gfqLBGmts/lNT/cwsHue+sv5rh25AhF8PCpDjiA== X-Received: by 2002:a05:6512:358f:b0:502:a4f4:ced9 with SMTP id m15-20020a056512358f00b00502a4f4ced9mr4139590lfr.62.1700464379945; Sun, 19 Nov 2023 23:12:59 -0800 (PST) Received: from [192.168.50.4] ([82.78.167.183]) by smtp.gmail.com with ESMTPSA id d15-20020adffd8f000000b003316debbde4sm8229214wrr.48.2023.11.19.23.12.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Nov 2023 23:12:59 -0800 (PST) Message-ID: Date: Mon, 20 Nov 2023 09:12:57 +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: Jiri Slaby , Christophe JAILLET , Richard Genoud , Greg Kroah-Hartman , 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: <5c2ec2ff-459e-4bb7-b287-8a06005c86f5@kernel.org> From: claudiu beznea In-Reply-To: <5c2ec2ff-459e-4bb7-b287-8a06005c86f5@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20.11.2023 09:04, Jiri Slaby wrote: > On 20. 11. 23, 7:14, claudiu beznea wrote: >> 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. > > How'd you avoid crash in here then: >         if (atmel_port->chan_tx) >                 atmel_release_tx_dma(port); > ? I wanted to say that instead of adding the chan variable the atmel_port->chan_tx would be used instead. > > thanks,