Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1049742rdb; Sat, 18 Nov 2023 00:42:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNu9dJJ7hq5SZ8kKJgegYPlwmuc3Nbk/LoSEAEihTxrYVIqhbE8bzoIkoWQIdHt2ackUwn X-Received: by 2002:a17:902:e74a:b0:1cc:42ce:f489 with SMTP id p10-20020a170902e74a00b001cc42cef489mr2134619plf.6.1700296950584; Sat, 18 Nov 2023 00:42:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700296950; cv=none; d=google.com; s=arc-20160816; b=vDsjtfTiN5MwYfXXN4SVqwxQ6cG6T8n5fVWySWirlh4MCXJ/FZTNitLaH97Tu0aME3 yf6kpqV8Zkt44m1cqz2MG8WhrLPxH90k6FzLYiQH3sDGp+GD54CTql8gcIBGrK+JP740 tdy0dKsanlmx4fnMQK3YUQsVFgspGNsYMUWCVYZWjiODbtqKGwkwHYC6mNUTrE7ZRYVL gy18CMm8/dP3vdqqp0jkClqku7fn+DOZ8f55qpkBY3Ukkr2ON6r91ZrHEihzWAOqBVAr hAHnJnA4ZjDjVg38nm6fuu5HcdLxagtB0fomCjB9ojRGrhMXNwnOXS3mHOzYiWmoZai9 0WHg== 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 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 Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id j10-20020a17090276ca00b001c9d7d70d7bsi3751884plt.4.2023.11.18.00.42.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Nov 2023 00:42:30 -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=gYp0LcfN; 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 5F9C9809F3A5; Sat, 18 Nov 2023 00:42: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 S232403AbjKRImR (ORCPT + 99 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 ); 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 ; 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 To: Sergey Shtylyov , Damien Le Moal Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , 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: 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:27 -0800 (PST) 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 --- 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(-) 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); -- 2.34.1