Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7977811rwp; Wed, 19 Jul 2023 03:26:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlGhLzFKXeL7gsUABHPmhvAmUDzS04mR8akOBDzgMQi6J14VWH9m6mejpx3ZzQmeUv9ICjue X-Received: by 2002:a05:6402:3492:b0:521:ab08:46dc with SMTP id v18-20020a056402349200b00521ab0846dcmr1979920edc.0.1689762418794; Wed, 19 Jul 2023 03:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689762418; cv=none; d=google.com; s=arc-20160816; b=lQ//5/zXr5m2sndPmMKF3LwjAIsTLx4GFlhCThozewrWtRg44z6YR7A6LGpfgAO2Qn QY2XZYrqJlm6OkkB/ChauJjgPgl2WpxUnHCmBNe/g/egoKAh8EX3pNQFP5VnGIKGza0r JpFGDOolGFcPIpUhe+08REN6mBKVtyt6gqualhxgJzDrNWADmQwaJF7WpSvOAzoRceDs AE89ZCs51Uryv+DO0nVjOKK7pbJ0ID62Q8PnMFadGC8MIokMQpQIk/3zy7ok5x65vnHx diUfgGM0aKw/II5+vTIBIZmLpU7u/mZ1dTkysbH2FCo5MLv654v1vii3Gm/7ILcf6CN9 wjOg== 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=R+P6B4lowUDiFRa3l0+rSIPJ6Eh09P0b7h68u2/Aozw=; fh=mRUbvDjKvXgo6/WWn25770jV9YXup7uDOuGijhJGHWU=; b=gTiymaGhV1+7+HAtZmydMgKTdWTsJGotyn8ba9mVmSAtoHEvbadG7FEm2wLYg2alNV w3Qy5FPqd/iEvVZyNJJZQSYjU1qaSUydSSEWjJc7wuquLEtOiCEmtfQtBrjSBYdV4aTl WzFfy/1Y2ELSGwq9djQbnJtEgCYWXshkHVOaYPYgsSiNBoEUEPkklxP3JeA3v0Ohq4f+ hb3ENodut8WNnPzvR23qfTnltwZEDfg5y/v4JMW3e/Sw7y/Z9ilZdCGsLsOCw6QZzXmi dIF5qTGjIfzJxYX520Aox+QrrZL4GptToTVf8db7Six9Mk6oxWhlY+A+4SvZLJJfQxaM h0/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=siEaH933; 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 w20-20020aa7da54000000b0051e19aae8d1si2772245eds.378.2023.07.19.03.26.33; Wed, 19 Jul 2023 03:26:58 -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=siEaH933; 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 S230310AbjGSKOj (ORCPT + 99 others); Wed, 19 Jul 2023 06:14:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjGSKOh (ORCPT ); Wed, 19 Jul 2023 06:14:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B10D41FC0; Wed, 19 Jul 2023 03:14:36 -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 285D761360; Wed, 19 Jul 2023 10:14:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A39C4C433C7; Wed, 19 Jul 2023 10:14:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689761675; bh=p8PJMo/HkUOLoUQK33wST8XgeJ0+lpjnWYTA907y6OQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=siEaH933L7LS9GDP+q5CsFA9WlPrVqWTIkwQz7tssFEWlZbR5wOkL+eE8Qs9bljMU jn/w9mMY83V+ynUBaK5fdYLaJDGXgQSeiuPTHOZwNCmFCNDOo86ZX00HRsitD4FhsM 6x6d8/QjfsBrGAUVrUxzGdpJ8L9TM7QRbzPvV31fenV7BSleoua2w4JIS1PPZbE90/ OtJPwLUOFAK6/wk+aOmfSAXNYNDROhuUaklWwqqWRRv7/BzaDF5JL8vGUZ86k6z/CR R2QK99nXLkIXaUAio6qea9Pndn7gNC5eoC+gTiDtJ3+Yg5MPLL8RVzvXHRVTyO+8R7 KhS7pGmnUgGGQ== Message-ID: <9c1b702d-fdee-b7c0-9e79-4822f0d2340b@kernel.org> Date: Wed, 19 Jul 2023 19:14:33 +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 v3] ata: pata_arasan_cf: Use dev_err_probe() instead dev_err() in data_xfer() To: =?UTF-8?B?5p2c5pWP5p2w?= , Viresh Kumar , Sergey Shtylyov , "open list:LIBATA PATA ARASAN COMPACT FLASH CONTROLLER" , open list Cc: "opensource.kernel" References: <20230719100322.6164-1-duminjie@vivo.com> Content-Language: en-US From: Damien Le Moal Organization: Western Digital Research In-Reply-To: <20230719100322.6164-1-duminjie@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 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_MED,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 19:03, 杜敏杰 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 > --- > V1 - V3: > Fix code format. > --- > 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..c85932c20 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") Seriously ? You keep resending the same. Still not aligned. And even worse: this will not even compile as this is missing ";". Please improve your process and (1) act on comments and (2) properly test your changes. > acdev->dma_chan = NULL; > goto chan_request_fail; > } -- Damien Le Moal Western Digital Research