Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7956560rwp; Wed, 19 Jul 2023 03:04:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlHBpggwWG1eMYJryC8RA/O4S1uaDIjs/cb+5PuckJdvxx+wp4dYqyi9yoyE0KwRlEtFjWHR X-Received: by 2002:a17:902:da83:b0:1b1:99c9:8ce1 with SMTP id j3-20020a170902da8300b001b199c98ce1mr2228932plx.51.1689761057374; Wed, 19 Jul 2023 03:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689761057; cv=none; d=google.com; s=arc-20160816; b=AUqw4NO2THNhMVGMhRJuviHuqcQGvht2+9vVAoDVZpcxRTKZusOM42SitraMugxz5z ol6Wf4H9E85kc8F6rTDOPJjOAn8opa/LLbtjJMVd2+Shjz65p9KCxlyCv6QO0TPOWpxO KJrrQj3l/LD6iTHyZwjDNB3/iIq1ojCzltdVmr3QCxM66g1coH7kgQkq92Q1YGbpSo2k gaPE+G/VjnRybBLBWueLpnVlR3qSyPSf7kHQ6fxQ3x1YRlH16azpv2PZKFcSpvJ9V4yM dNI34m25aJoGsYdN+xyYM+OZgXUhrNAMHF3W8GfxIoGJAZDHxOGLsjX3510Z3rB3GEH+ pgNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=JG7h1YKeuYDhQzm9Wm0iiQvLd/wFn7MA3wA19tUKkoM=; fh=ZUA4A/uwqVdfnj5kHtb2405JbSLBbx9iqxif5cgb4o4=; b=gu/z1Autuyxe5lv85YWC7LBq7xKbnxIJ4zzuK+Jc68jsBFdepTuaSEUFTsi9MuHI4o 9/mxBXq+y0wA6UNVErleCeYQC+FIobODCfkkaL9RHyLian7sYauF+j40/L/T7s59VJBj MsXpWCTUOZ0v/juCf0o7YfTXPthtDEf+TaDzyDlhiyw6aWLro9xCQV1nxViqbGecRFHk Lbm083PzfXZRkBLBpNl8/DA75Q0UX8FK3dFw4aVO8MsgWAdEtNwx8X3h2uCPgs3N0REf AnAU32IB/EYADQdXJ9HEIKAmLyPjD5CSgtDLeZZTCM7Eq4y77H7I6crmPigdJwxTi9Rq WF/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qX8RP0Yo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n5-20020a170903110500b001bb02e4b739si3315226plh.475.2023.07.19.03.04.05; Wed, 19 Jul 2023 03:04:17 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qX8RP0Yo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230103AbjGSJmi (ORCPT + 99 others); Wed, 19 Jul 2023 05:42:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230354AbjGSJmY (ORCPT ); Wed, 19 Jul 2023 05:42:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A923C10CC; Wed, 19 Jul 2023 02:42:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 40F3D61331; Wed, 19 Jul 2023 09:42:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 063C0C433C7; Wed, 19 Jul 2023 09:42:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689759742; bh=VUUMVFRdDD+K3SsdpeBN5Pr1IQErJJ9Z1IMYmvDtRWk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=qX8RP0YoMkFQGnMYToXqpkLx3i6P1sVy2uKaGNGCB7PD1YM9sT2T9uVZlHOJxcE8z lBDDhZKehTgHeuP/T+pRYP+emgIay3xu5xdJEu9wUGuwEAGJb2RR39n78i1KM+M3iN oHZ6FaWOXCKWeZq9Xbo77c5q1kYlI+REyZZaF+Auy3L9L300lY7GOnDa90KuNaqm1W 9wf5qHtsJfBuju5eeNEfDQ2s5/UlnSqxTn8kg8k7RJA8dZ5FxbUlgpfICHCpUb44lD 3Hg4ary0ZIX4pM0RtxftPm3G5TQ/oS6bnuwVPemPQoCvSBfkmrBpifoYt4KD9TFgAA OjvHo+0UwYjYA== Message-ID: <642db1d9-5e22-30ac-a1be-6825ac871c06@kernel.org> Date: Wed, 19 Jul 2023 18:42:19 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v1] ata: pata_arasan_cf: Use dev_err_probe() instead dev_err() in data_xfer() To: =?UTF-8?B?5p2c5pWP5p2w?= , Sergey Shtylyov , Viresh Kumar , "open list:LIBATA PATA DRIVERS" , open list Cc: "opensource.kernel" References: <20230719073140.4971-1-duminjie@vivo.com> Content-Language: en-US From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20230719073140.4971-1-duminjie@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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/19/23 16:31, 杜敏杰 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. > > Signed-off-by: Minjie Du > --- > 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 6ab294322..fd54682f1 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"); Please align the string argument after "(". > acdev->dma_chan = NULL; > goto chan_request_fail; > } -- Damien Le Moal Western Digital Research