Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1680260pxb; Thu, 7 Oct 2021 12:44:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTGQt109D6IdHsjHINP7FxH/Nc5xBhAeCG8affPIRDHYFDs82Ve4X2el0Duq51xe++DW6+ X-Received: by 2002:a17:90b:11cd:: with SMTP id gv13mr7652316pjb.210.1633635854818; Thu, 07 Oct 2021 12:44:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633635854; cv=none; d=google.com; s=arc-20160816; b=V1eSWCK5ccWdiB8J85FpEDoVmoYj5/C9bA1OyqWTI376yUCoXzHrDvpkPEhc/u/XiN JspJ9EotxavtkhJDRzp042nvQIBAjsjLXaZDjN5dSKZmUjvSnZxg0NwtUL1LpX5MUIQV 8Skzpjqczw/Jesoz04fAxO3mvlulW0zTauBqXnLLxvnFYljMq3IkaNR99iBsGN2Zd5QC 0h1Mxi6dzQAbvjGLVRyXLz1Eb1PhA9U4aY2uWOa2qfLs6zX+tW0PAwg+4gFsQBehuJe5 7wotPPUzrWUZ7F25NhA/SEQTyKp7w1gSaBb/VX4WKZ4t8cuOkUBOt9ZteQ4AhTH0IWfc aXdg== 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=pkF9Z8gioCbTvoDnOvqn/n7sYyLCrn0gcPhgSbw+to8=; b=QO2cDRVED0nQxmiSZKXJG2GkllZJtrkEC6597hGxLzMxM0nIGZKqwUq54JTe+dU5vz 6pJc23JiEINPSAlSnc2cYRpcxfaxhpaUT1NHedaF/tS+q4uRAFfvLaar8r2AVjL1NKKQ vfc6POtYMv2XJSjaKDq16unw61maUbfLNEMOY93o1+tQDDRK+SED7sVImqRxdS7LPWg5 6Auhzsq5VD5/TVplqT/Hkckfb2Yna3PeZsRjs1ctNuWsrptSy5tMenbuwAxBZrCb8neH +Bnt8MO6vG/n2HI6nO9yvfYhMMCYh1ZlvdSFBrEBLHKFLl7vU422OQidtXL4GGNSavhg 24Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=PpXoqoVK; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h192si254344pgc.181.2021.10.07.12.44.02; Thu, 07 Oct 2021 12:44: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=@gmail.com header.s=20210112 header.b=PpXoqoVK; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242513AbhJGRcl (ORCPT + 99 others); Thu, 7 Oct 2021 13:32:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233734AbhJGRck (ORCPT ); Thu, 7 Oct 2021 13:32:40 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F8A8C061570; Thu, 7 Oct 2021 10:30:46 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id d9so2051685edh.5; Thu, 07 Oct 2021 10:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pkF9Z8gioCbTvoDnOvqn/n7sYyLCrn0gcPhgSbw+to8=; b=PpXoqoVKK5DVlD8743ZCxDp+4+GbpjPDX5Cl0AKLePo/QCf21H8vAHmdhsNIKoDOiE JLWDXYyx0zz1YPaMMBr+XydiGDD/xunA0JRsygTDsYKDT/8GveenNuGVcriq0P7hIRdY NBQrt0LQNhtqybT8590rcr4csQmgi91btqeTnIlyuLIcfTbG2i2UlMbR0nGK9YrSCwK4 oBPMdbC8SYyBGOztxlK8VEKZ/TvnU1mOalqtGjrQIgPURDG+ZegjGD+6z2qNcv8o61ue 9w8+09CP/YYf614Nw/P6fZs17/Q8Uh1WBssx149gT1gQk/LbXBhLkjd9BSccT4cfXA92 /gxg== 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=pkF9Z8gioCbTvoDnOvqn/n7sYyLCrn0gcPhgSbw+to8=; b=a9CG1uGZS/QCggmVZDPSiSVQGa7naxAZfNNJgHJnNU67RhosL5y+xc3NrtPDELdlrJ B9oURyi5JqxZkd2+DwL5wmbdS4ktxJ8bp4QcBpn4AWjKw7hKkvUvSiPz6Z0jV0YrQP0v ZrIoyPMhu7udSeanHxA/4blxaJ41ZCYrCGjjApWFohQ/AZLhNpIMWrfw5AKS5pTIm8O9 tCjvEwlWF/o7hA0J3RGVqoGUiEo+HEMpDiUh8P+rVz9LdBRojLTIB0TZjs+d/ZLohLMk 5zQKRg6YkzLZCWkRAjMMOZEEOI2jk3T1w9JuG3of/jAIQf6k6H8rPspfFYUIQ3QOptD7 oxMA== X-Gm-Message-State: AOAM530Av5YGVTMw1a8QEZp4ZOauPuu9o95HIB5bTZHsxXO3cpybQJ78 MzvIGmnJaBvK7WtXv+wiP7HzYNY/FG/YRbn7EzQ= X-Received: by 2002:a17:906:7016:: with SMTP id n22mr7062476ejj.567.1633627844830; Thu, 07 Oct 2021 10:30:44 -0700 (PDT) MIME-Version: 1.0 References: <20210928014055.1431-1-caihuoqing@baidu.com> <20210928014055.1431-2-caihuoqing@baidu.com> <20210929180638.6ddb313b@jic23-huawei> <20211007183052.66be899b@jic23-huawei> In-Reply-To: <20211007183052.66be899b@jic23-huawei> From: Andy Shevchenko Date: Thu, 7 Oct 2021 20:30:08 +0300 Message-ID: Subject: Re: [PATCH v2 2/2] iio: st_lsm9ds0: Make use of the helper function dev_err_probe() To: Jonathan Cameron Cc: Cai Huoqing , Lars-Peter Clausen , linux-iio , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 7, 2021 at 8:26 PM Jonathan Cameron wrote: > On Wed, 29 Sep 2021 18:06:38 +0100 > Jonathan Cameron wrote: > > On Tue, 28 Sep 2021 09:40:54 +0800 > > 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. > > > > > > Signed-off-by: Cai Huoqing > > +CC Andy who wrote this particular driver. Thanks, Jonathan! > Change looks simple enough I'll apply it though and at least get 0-day building it. > > Applied to the togreg branch of iio.git and pushed out as testing for 0-day to > work it's magic, ... > > > + return dev_err_probe(dev, PTR_ERR(lsm9ds0->vdd), > > > + "unable to get Vdd supply\n"); > > > + return dev_err_probe(dev, PTR_ERR(lsm9ds0->vdd_io), > > > + "unable to get Vdd_IO supply\n"); I prefer seeing them as one liners, but I've no strong opinion. -- With Best Regards, Andy Shevchenko