Message ID | 497fe3c81b83ea74c4850bc44ea09acf15886b7e.1700296910.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp1062144vqn; Sat, 18 Nov 2023 00:42:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7QRKUkUwyhRRkRKzddz+OawYu42+W3GfLfKi9HCNc4W+w9cqO6qy/+yeCFSQbKaFjq/AM X-Received: by 2002:a0d:de81:0:b0:5bf:f8d5:7c3a with SMTP id h123-20020a0dde81000000b005bff8d57c3amr2342082ywe.26.1700296959120; Sat, 18 Nov 2023 00:42:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700296959; cv=none; d=google.com; s=arc-20160816; b=fajxuvbvQllK22jx/qEzJSR3yCQVl9D4DDJ/bB9pA4hQ7EujdeuaAj5+sulxVwhtZC UuUzmAC4gzbevFeLBg1zx1zfRAVW8bNbFIA4DdfnVUImpnVBCEnkZ00xwLH9RDyfzZQE nrKX+AnyS2PHc1tCjlDDIFNNOQo5/f4s28HLJMYi5m0gU4SdxVO7vSkOBvQxr6m2rmhT SX9Yn3pPUQBKiSoQ0zgSVr+47tHha0kPRWldqArE6NlkI43hI7r3tXdmYrp8MDPSqtye SDmGVOPh+GxN/+MEVSjChdXkc0G0ItD69q11ShHRihk6oL5T/yXKsFM4jqSKGQ4Dwj6x IipQ== 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=ndyYzPGfIFWFzQxlHxzHKrwnfoAbUHaX6A64uMZYaoc=; fh=e/wPvxxC3Cn5AeoSGvCzQtNh5YYkvxmVxJxB3aKQtic=; b=pnwIvoVeOVYZX4taUifBAcrqWLQKtUjvclsl+RYqoG8wh9n94abnITrVdJ+kB35K39 VvswUH20I+MNHCSuQyJb6Hq3VNgs6av8Uiirj0+qYY42rWYd+OCMNjqc+RNazSEOU0le 7SLqLUAyzZZrIPyX8kXEYtxLquSFQyPtIYEjv5h+iOvsHfmb1UOaeGYd36LMmovXq8a8 rMOAmVECCIBTUZksW7YZzFwmg2ImJQyT4MnirOK3OHdnVTSLuFbFgyNIIu9FnNseLUol IsGMlvFpGVsykPvQJ3jrpxy6fs6k4taeTyY8UfSukme3jyKd+nv6HHXeB9nXrO8gW+bM tv1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=gYp0LcfN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id x124-20020a636382000000b00578c8ce14edsi4083767pgb.252.2023.11.18.00.42.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Nov 2023 00:42:39 -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=@wanadoo.fr header.s=t20230301 header.b=gYp0LcfN; 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; 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 D4808826EC87; Sat, 18 Nov 2023 00:42:36 -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 S232437AbjKRImR (ORCPT <rfc822;jaysivo@gmail.com> + 29 others); Sat, 18 Nov 2023 03:42:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjKRImP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 18 Nov 2023 03:42:15 -0500 Received: from smtp.smtpout.orange.fr (smtp-25.smtpout.orange.fr [80.12.242.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86252B9 for <linux-kernel@vger.kernel.org>; Sat, 18 Nov 2023 00:42:10 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id 4Gu0rJpY1TzFX4Gu0rZIvI; Sat, 18 Nov 2023 09:42:09 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1700296929; bh=ndyYzPGfIFWFzQxlHxzHKrwnfoAbUHaX6A64uMZYaoc=; h=From:To:Cc:Subject:Date; b=gYp0LcfNEYwN0zUxtUeKOT/rQuzhU9R0EE8KjvCPmCW+wIXE3s8icUkzMQLXrDsMp oCpgI3aGdfkw/6e9kqYSnl86DnLlkRygox1xlhomCKruir/A9pMFR7LcVjxSJ1RV8+ szp2/KVxKQIESghWu29zfJ1I5dHXBN92wAdYskb/5C8kfWPXvTEE/YeonTXyN9iQ74 R5TxlbqLXxFuZFv+b+IHwIYDduCeZQ6GWO6PX3BZwcCIE6Mcc7aZwAkE/2/dHzA03e tn77Rbd6SEfBn/GWyZXo2wOwH9mX8HGCfeBEoh9ETjlxjX5cPsX9fF5uKV5VsuB1Qj +Sjsp76aHicfg== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 18 Nov 2023 09:42:09 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: Sergey Shtylyov <s.shtylyov@omp.ru>, Damien Le Moal <dlemoal@kernel.org> Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, linux-ide@vger.kernel.org Subject: [PATCH v2] ata: pata_pxa: convert not to use dma_request_slave_channel() Date: Sat, 18 Nov 2023 09:42:07 +0100 Message-Id: <497fe3c81b83ea74c4850bc44ea09acf15886b7e.1700296910.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> 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]); Sat, 18 Nov 2023 00:42:36 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782890584465093137 X-GMAIL-MSGID: 1782890584465093137 |
Series |
[v2] ata: pata_pxa: convert not to use dma_request_slave_channel()
|
|
Commit Message
Christophe JAILLET
Nov. 18, 2023, 8:42 a.m. UTC
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.
While at it, also propagate the error code that is now available.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
v2: Propagate the error code [Sergey Shtylyov]
v1: https://lore.kernel.org/all/f177835b7f0db810a132916c8a281bbdaf47f9d3.1699801657.git.christophe.jaillet@wanadoo.fr/
---
drivers/ata/pata_pxa.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
Comments
On 11/18/23 11:42 AM, 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. > While at it, also propagate the error code that is now available. > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> [...] MBR, Sergey
On 11/18/23 17:42, 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. > While at it, also propagate the error code that is now available. > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Applied to for-6.8. Thanks !
diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c index 5275c6464f57..538bd3423d85 100644 --- a/drivers/ata/pata_pxa.c +++ b/drivers/ata/pata_pxa.c @@ -274,10 +274,9 @@ static int pxa_ata_probe(struct platform_device *pdev) /* * Request the DMA channel */ - data->dma_chan = - dma_request_slave_channel(&pdev->dev, "data"); - if (!data->dma_chan) - return -EBUSY; + data->dma_chan = dma_request_chan(&pdev->dev, "data"); + if (IS_ERR(data->dma_chan)) + return PTR_ERR(data->dma_chan); ret = dmaengine_slave_config(data->dma_chan, &config); if (ret < 0) { dev_err(&pdev->dev, "dma configuration failed: %d\n", ret);