From patchwork Sun Nov 19 14:52:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 166818 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp1685622vqn; Sun, 19 Nov 2023 06:52:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFnL0lrX3JZXIgZyM6opMJGdIQVxj4Vtt9YmTKmze6R+wdPJIQqig5RzDZWWoTAQtudLoFX X-Received: by 2002:a05:6e02:df0:b0:35b:cd:c7f9 with SMTP id m16-20020a056e020df000b0035b00cdc7f9mr1001047ilj.2.1700405572927; Sun, 19 Nov 2023 06:52:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700405572; cv=none; d=google.com; s=arc-20160816; b=YqxiwOY86Sbn4WXZ615uCwwZ2NPCRHzL3qfF02mZg3ktMDRGn9Uo47G+hwoKugkrzV BtL9s5vBZUJeMTwN2t5X3hucILJSIqyrP8qFVt34tOVgsWgY+OI3etIFcRbYgd+YII74 JJ2vvnq3NwKGJzkL7O3J2huLhlNnOvC9Wm07G/ysOXp6l85o1ll8O+LtHmk9D/ulvfdz OdACFgKvDKiBZVJXOAX40G67TVwIzVG7ySDNXJAmaftRXm26MTj8oyEaT50crfmYMjXJ wi1/WKxL8/xnAgqP/t32muC294KrXlz9xOZiqO3K/lqzonZjmZ4T97vd5mrY6w/4aSAk uRtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=pAh5rfKWMlNtS3iglM7rvXZUQgMkHc1XA5sjN2Bujj0=; fh=UrvPZO+KF9De4+H6ecbtj6PgOMwm0pQvTHjA7TZnhZ4=; b=byrxx7xuhCcjtp1+nLhGDAEn7hJZAtHr1PiRdQ3zjexr1IantnyA1hpaHb0i7CMu0Q 3bwrulEbUVMYnTtFJrH3XDScQr/BcpuqKMCVAvLEQQDHAkrcghfsGuE4kUpyWfEq96ZB 6cEKP0mzNNJSyvQdlTfAgmOjUwVGT7/yhkWqPtuDVjJ7wi98ba+6xXGADvRD33ujsXkK G3EEWpMx7v4J7+zfupqRmgi6OaXH6isNFp/XNvaBEDcIl/nbRfirVmjeI47pdjzYlZTh 8EGrevLBZwM4ALmcMBfnqc/gss7P8BMpZS6pxKnbp/ZbRubLcyYbSpFWtNbeK3QxvVfP N3HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=nr1WCNZ1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id t32-20020a635360000000b005c207717411si5483706pgl.864.2023.11.19.06.52.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 06:52:52 -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=@wanadoo.fr header.s=t20230301 header.b=nr1WCNZ1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 05FA38080EC2; Sun, 19 Nov 2023 06:52:47 -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 S229575AbjKSOwt (ORCPT + 99 others); Sun, 19 Nov 2023 09:52:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjKSOws (ORCPT ); Sun, 19 Nov 2023 09:52:48 -0500 Received: from smtp.smtpout.orange.fr (smtp-13.smtpout.orange.fr [80.12.242.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26147E1 for ; Sun, 19 Nov 2023 06:52:44 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id 4jA9ruwTOmTW54jA9rDjNP; Sun, 19 Nov 2023 15:52:42 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1700405562; bh=pAh5rfKWMlNtS3iglM7rvXZUQgMkHc1XA5sjN2Bujj0=; h=From:To:Cc:Subject:Date; b=nr1WCNZ17TxtLQoBclQyq/hfThLxHkEbPzeLuCWXz17pZ3yIGLXTEexG7YAO1Ykqr /LNk7LDQms7vr5V7RZGWFaKhOLv1DeVys/wkB22wK5ng7xljxPxQ7yNI+AOs0CwUqo BuzeFrzWCLR7m5spvt0AAugudqbH2pFKA4VA8JqUjm4f09OpsBwSD1AMxS7kSo9v0F wIbgip2ykR2lE6zTJD5srTPeX9Zff+1wdEcxMIVVOe+DXn4mowsAJaaJMY3lpZTJ6z PJ3xrlbJ+AHzgsEJXx6u1bSgStXLScOTflJYKrLF7MyugPVICwJIpAiuO0UE4YOpHU WgvzA+/G/0pSQ== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 19 Nov 2023 15:52:42 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Russell King , Greg Kroah-Hartman , Jiri Slaby Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-serial@vger.kernel.org Subject: [PATCH] serial: amba-pl011: convert not to use dma_request_slave_channel() Date: Sun, 19 Nov 2023 15:52:39 +0100 Message-Id: <6f76e22f77d776d6c1f176d56e7ee341314d8554.1700405529.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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 06:52:48 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783004474105541439 X-GMAIL-MSGID: 1783004474105541439 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 --- drivers/tty/serial/amba-pl011.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 61cc24cd90e4..6d7bfe9399db 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -444,9 +444,9 @@ static void pl011_dma_probe(struct uart_amba_port *uap) dma_chan_name(uap->dmatx.chan)); /* Optionally make use of an RX channel as well */ - chan = dma_request_slave_channel(dev, "rx"); + chan = dma_request_chan(dev, "rx"); - if (!chan && plat && plat->dma_rx_param) { + if (IS_ERR(chan) && plat && plat->dma_rx_param) { chan = dma_request_channel(mask, plat->dma_filter, plat->dma_rx_param); if (!chan) { @@ -455,7 +455,7 @@ static void pl011_dma_probe(struct uart_amba_port *uap) } } - if (chan) { + if (!IS_ERR(chan)) { struct dma_slave_config rx_conf = { .src_addr = uap->port.mapbase + pl011_reg_to_offset(uap, REG_DR),