Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4950312pxb; Tue, 28 Sep 2021 07:33:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5X3mqRvb9GiKGxX4mSW6dzFgKHAT6SeEYSp6EaYVpLEbM9MIcY9hkk2cJjSaak/eWKMBG X-Received: by 2002:ac2:5442:: with SMTP id d2mr6026526lfn.275.1632839594671; Tue, 28 Sep 2021 07:33:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632839594; cv=none; d=google.com; s=arc-20160816; b=J2u2CJCQMDZxA1hpzCOVWMPiFy/MonUuAltqGKG5rMCj++/hbeplvtvR70QRz+TZui p62Xa6qAx8wrtfynokIwlI7qDJiVS9p++Wfm5ZgbAKTSbnOxADdAsAH8DCsEAFVx51jD UfLrMC4JLUEqzzj7qqeqS8DE70jZWfcpq/XVP8euG7rkHpCSry8dGhJXBSDc9Zcj1jt8 h2/Hzhm07lT8vER0HLCJnixfNfOLRzfCRu0vH9J2rV5LdaY1MyCLzH58SC7UqWUtI/xu 5BLZ/BjzIOCxZe5E+fX4jP+MOU87HU5rFZbJ/UUNwPlvpH8OEAR5FPtMU8WqDUxLAeng qphw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Uh1B6XTocg/PuNZlNsHJ5qn3ywJ0pfLGKGnm5l1sB1s=; b=ufAYQubnVXcUoQ00y3bVu59L/JKfPDaiQd4NeBrno8XnOfQgR1k7XRiKx8jM4m7O3J aeuCrPNsX9Q7kGhAXsdpa+JDfVP1W73mWCccHK8pyx76avwuTyYuWkK14OMAbqHqR2SS smHAfb6VBDSChR75W1Xo4lbs9G9mEBcyqEi/4znwD9oF0ciL1W/Y0jKRnTv3ecULuxVm raMnec2jvh3IiwDvxAfll3AX/7Uvi+TYW1xXsVSDp7DOkZUOkcAmXw9sR/6uyRpFsnVD T0w9KsJVOAiXPGv6Mjy7XqzReHti3HzhCdQLrtaWBbEApUOQBmljdd2my56x8+xnZomj JHvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bt1vQ9mF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si21179956edh.555.2021.09.28.07.32.48; Tue, 28 Sep 2021 07:33:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bt1vQ9mF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241293AbhI1OcT (ORCPT + 99 others); Tue, 28 Sep 2021 10:32:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241280AbhI1OcL (ORCPT ); Tue, 28 Sep 2021 10:32:11 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DE5FC061745 for ; Tue, 28 Sep 2021 07:30:32 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id m3so93539114lfu.2 for ; Tue, 28 Sep 2021 07:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Uh1B6XTocg/PuNZlNsHJ5qn3ywJ0pfLGKGnm5l1sB1s=; b=bt1vQ9mFtLWbSomTDSPbF5QE3RLYCRSGiCjPdnKP0BYNmZ22nN/5dQreFOHtJlZP9A w1Ju27SQF3MMrUPKopIdjsdV0fU69078TLg3O6fDK6EtaBVBFxWWwokt6QgWln5o8xT/ 0FE64IiWO7MHsJ9hCkLWJ0A73tKdDUIHDA2H6cYZe3v+aaEsZvFVbmFcynWdoX4JFqyW VHhtrRCMq587NZq3jdj7pcF+xc6daSurloZBhgz178YbCvxjCtZ9KIVs5/G/eVu3cZz0 O2DoTHqZJqv61DW3iDhIzQkvY9RLrrmCkYy5YJEATVCpeoiBUANGdDnTN7VJiWwB9a31 i2FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Uh1B6XTocg/PuNZlNsHJ5qn3ywJ0pfLGKGnm5l1sB1s=; b=J1YbQ+Ml0lxmg9G75C1z5YMlTnwce/r/cTWPxSVT6doAHRRKCbc/ETWdY1hqpVyhhe Rwr0Jlo4vhteCeKVWQJNXUvK/Agno1p5mhzScTMW6RqLosF4RZK7ZaQorxDjZx4WdgxJ E3N0VhILfvSpYlP/DXjLmlXBPq5b06ERLkIoONGGsus7TOgSgQbohKq8A+FVZtid45Hq 1y/BbYssCRrLWRj8LWzjOdb4+frV4FVIkBqsGuSXIHzz9FYiXtKPUULFWunTQGGCn6l3 DxHNEq/ZP7vjPanFYjS03QFsWq2KYIsiRR/aevjD89eHBRODdw7XQKWps8HmrutjKZ3X pnjg== X-Gm-Message-State: AOAM53130LWOksq5w+gHGV7h/q3dqeR7V7yExZ0tfNE/tg8gdEo8BV6P vkSGrq5vkby5LLCvoDTj4fNafaRl3O8GUEoqyrAM8g== X-Received: by 2002:a05:651c:1124:: with SMTP id e4mr253677ljo.261.1632839421344; Tue, 28 Sep 2021 07:30:21 -0700 (PDT) MIME-Version: 1.0 References: <20210928141956.2148-1-caihuoqing@baidu.com> <20210928141956.2148-7-caihuoqing@baidu.com> In-Reply-To: <20210928141956.2148-7-caihuoqing@baidu.com> From: Linus Walleij Date: Tue, 28 Sep 2021 16:30:09 +0200 Message-ID: Subject: Re: [PATCH v3 7/9] iio: adc: qcom-pm8xxx-xoadc: Make use of the helper function dev_err_probe() To: Cai Huoqing Cc: Jonathan Cameron , Lars-Peter Clausen , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Vladimir Zapolskiy , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Andy Gross , Bjorn Andersson , Heiko Stuebner , Linux ARM , linux-iio , linux-kernel , "open list:ARM/Amlogic Meson..." , MSM , "open list:ARM/Rockchip SoC..." Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 28, 2021 at 4:20 PM Cai Huoqing wrote: > When possible use dev_err_probe help to properly deal with the > PROBE_DEFER error, the benefit is that DEFER issue will be logged > in the devices_deferred debugfs file. > Using dev_err_probe() can reduce code size, and the error value > gets printed. > > BTW, change the return value from 'ENXIO' to 'ENODEV', > perfer ENODEV which means no such device. > > Signed-off-by: Cai Huoqing > --- > v2->v3: Update the changelog. Reviewed-by: Linus Walleij Yours, Linus Walleij