Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4254048rwo; Tue, 25 Jul 2023 03:16:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlGFuYwEPSrfLnNzJwp5cYpNgwLnkFCyalQCtvvuDCF9imJnbsZG4EJ1Jal9d7tGWDKEhVzQ X-Received: by 2002:a17:906:2d6:b0:992:c5ad:18bc with SMTP id 22-20020a17090602d600b00992c5ad18bcmr12224729ejk.70.1690280193605; Tue, 25 Jul 2023 03:16:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690280193; cv=none; d=google.com; s=arc-20160816; b=bq6NaUaAZyB8HACqIOU/YDy2GNlS3HzgtJfp+rpUsv67e2vJ3K81zTvpYqjWLtON7r 8zlKzYi699uZiqJf7YVpmONlFfPPDb0gElMICBxWfuOcsP1plxCXzZYmro8B+03fjHQ/ 0f/lPt1hXC4EHD50ON1praZ5C1JnzspEuuzqxbIE0Tej3ajyiwKx5WarjuQlM29HeHtv wAyv7cyoU/HjqGS7spRqHh8ktTigdkSia5Kq7f1wlO/+DkVuIKsKHMHKWJQWhrQrfHHe QCmJeUnDqLYlhuqIPiOKN2OBiaWheW8BtkvEvNASB+ma/gsNfPcpcC+CFWfg3p7RQQ1U 35eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject; bh=Pu+nGwA/ozxloCr72ETXVMmYkR9F+m+z6NHa34j1aSs=; fh=TerSfFe1icaqJPkQEDbFoTC5UIQnX4M8mytD1tnKI2M=; b=spEqTJ2IIechVDrgooP+08luWkEK4NfzGSiVuKq5KpsOo8ttJgcRvyxf4zXigbb+At tYtj+oy9XfFQtRQxtrhfncMer5RSzvVohcM/EPM9dHLiYNsNDrha6G1bpdagUTxJeA0z 6bgFHlxizrbYWu36s91g1ki9IIYfwGHHk2gMZZzb0/MjwR1WtDHTfe7+xJJ7cJSFDzyK 5W3A+WtjLTHuQE1fsfP5UOsoLEgMAaumoORSHGcfAnQ9nusiEQWoLrl0oEt0jK/w6rDM gM7Eu2E5Yu4Xvo7d9LMWyo29eEby5RUi/jP+fuJPtaKdFKqVD40OCLvuwgI8LeZTY/lC w/zQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020a1709064a4b00b0099b445b4f45si7425944ejv.389.2023.07.25.03.16.08; Tue, 25 Jul 2023 03:16:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232697AbjGYJvY (ORCPT + 99 others); Tue, 25 Jul 2023 05:51:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232137AbjGYJvX (ORCPT ); Tue, 25 Jul 2023 05:51:23 -0400 Received: from mx01.omp.ru (mx01.omp.ru [90.154.21.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F6421A1; Tue, 25 Jul 2023 02:51:21 -0700 (PDT) Received: from [192.168.1.103] (31.173.80.27) by msexch01.omp.ru (10.188.4.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.14; Tue, 25 Jul 2023 12:51:15 +0300 Subject: Re: [PATCH v5] ata: pata_arasan_cf: Use dev_err_probe() instead dev_err() in data_xfer() To: Minjie Du , Viresh Kumar , Damien Le Moal , "open list:LIBATA PATA ARASAN COMPACT FLASH CONTROLLER" , open list CC: References: <20230725030627.1103-1-duminjie@vivo.com> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: <73953f8d-90b8-0625-da9c-a4d7207a816a@omp.ru> Date: Tue, 25 Jul 2023 12:51:11 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20230725030627.1103-1-duminjie@vivo.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [31.173.80.27] X-ClientProxiedBy: msexch01.omp.ru (10.188.4.12) To msexch01.omp.ru (10.188.4.12) X-KSE-ServerInfo: msexch01.omp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 5.9.59, Database issued on: 07/25/2023 09:01:19 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 59 X-KSE-AntiSpam-Info: Lua profiles 178842 [Jul 25 2023] X-KSE-AntiSpam-Info: Version: 5.9.59.0 X-KSE-AntiSpam-Info: Envelope from: s.shtylyov@omp.ru X-KSE-AntiSpam-Info: LuaCore: 525 525 723604743bfbdb7e16728748c3fa45e9eba05f7d X-KSE-AntiSpam-Info: {rep_avail} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {relay has no DNS name} X-KSE-AntiSpam-Info: {SMTP from is not routable} X-KSE-AntiSpam-Info: {Found in DNSBL: 31.173.80.27 in (user) b.barracudacentral.org} X-KSE-AntiSpam-Info: 127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;omp.ru:7.1.1;31.173.80.27:7.1.2 X-KSE-AntiSpam-Info: FromAlignment: s X-KSE-AntiSpam-Info: {rdns complete} X-KSE-AntiSpam-Info: {fromrtbl complete} X-KSE-AntiSpam-Info: ApMailHostAddress: 31.173.80.27 X-KSE-AntiSpam-Info: Rate: 59 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dmarc=none header.from=omp.ru;spf=none smtp.mailfrom=omp.ru;dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 07/25/2023 09:07:00 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 7/25/2023 6:34:00 AM X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/25/23 6:06 AM, Minjie Du wrote: > It is possible for dma_request_chan() to return EPROBE_DEFER, which means > acdev->host->dev is not ready yet. > At this point dev_err() will have no output. It will, else the patch wouldn't have been needed, right? > Signed-off-by: Minjie Du > --- > V2 -> V5: Fixed code formatting errors. > --- > drivers/ata/pata_arasan_cf.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c > index 6ab294322e79..b32d47112c0a 100644 > --- a/drivers/ata/pata_arasan_cf.c > +++ b/drivers/ata/pata_arasan_cf.c > @@ -529,7 +529,8 @@ static void data_xfer(struct work_struct *work) > /* dma_request_channel may sleep, so calling from process context */ > acdev->dma_chan = dma_request_chan(acdev->host->dev, "data"); > if (IS_ERR(acdev->dma_chan)) { > - dev_err(acdev->host->dev, "Unable to get dma_chan\n"); > + dev_err_probe(acdev->host->dev, PTR_ERR(acdev->dma_chan), > + "Unable to get dma_chan\n"); > acdev->dma_chan = NULL; > goto chan_request_fail; > } Reviewed-by: Sergey Shtylyov [...] MBR, Sergey