Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp681845pxa; Thu, 27 Aug 2020 12:50:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5jlujrZufokprEOYfMFalsubkLUaJFpzGHIMbj1Nqm+mNvdTA9EuBCIdjIyC+WtelN3Yb X-Received: by 2002:a05:6402:297:: with SMTP id l23mr21575770edv.145.1598557814114; Thu, 27 Aug 2020 12:50:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598557814; cv=none; d=google.com; s=arc-20160816; b=iT/FT5Ht+2gxwkynNRC8dQwuwR14ifZ5dZ+flL13c2ajAUyZKvKNJ2gRrUY3Dk9Z4A 8WtAfdhEvL4ePRdluMzueREBS+5eB6BgIr9tzz/T1U53TVeBNuTyD/AsE7kAltN9fPZR GbBRPsIM2ss2Ha5w+M6FEn6D1x/OttqavGIdFE4vboejlxurd+lIE5in/Cwig61aZjMl TIn8U1F8S4wa4EzZBaN/fRBEyA84Y1jiLNabISnO4iUexjWmHbY7K6XCaDbgsNynfFEt rRmxb1p6GSJTJetyaWw/hRGMyz0rZDQvJT5U+BTX5BiKGdDh0Qdiru2v3/NTtu1eh6RN 6znA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=WpaQTjLfV7KuSsjB4F9wP9EPb6gXE6IBxqNf6Q1HCtA=; b=JKPcr+o8TsBFT76cFwEa7QfsdvljgSu94isFpwoBWW6O/usr9a89Ke47xZ4ExFrkFc Jf4nb/F9JZE+IvIYtpaRsphX8Ty4d8B2uOVFMz/qAPFlMNEML8Ih2jz/xGyg3/aPGJGh 28YAABX/6WNrwkEuW5VEXyaIWXNQ2x1CD4GOPc3C0uj0wddiNkKLSeVE/nNiOJp5SXqO 3+x//+NTrdPunqEOPwOvF7sFW+njzK2SvXKt+3XqGNEUwbRAYWu/aBO1MOkEH+FYFr6Z Poe2flystfXPVnHHHcn8ikW7EBRcF2/rEzPWpRYQM1K+S5xUgTQqp4hz3sd8yrAf7M81 M0lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vMMPvCok; 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 p8si1985259ejz.594.2020.08.27.12.49.51; Thu, 27 Aug 2020 12:50: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=20161025 header.b=vMMPvCok; 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 S1727892AbgH0TtN (ORCPT + 99 others); Thu, 27 Aug 2020 15:49:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbgH0TtN (ORCPT ); Thu, 27 Aug 2020 15:49:13 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E04A0C061264; Thu, 27 Aug 2020 12:49:12 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id 31so4090381pgy.13; Thu, 27 Aug 2020 12:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WpaQTjLfV7KuSsjB4F9wP9EPb6gXE6IBxqNf6Q1HCtA=; b=vMMPvCokJT5yJ29bs2poZN7/8ToLpy92ObHhrh0C8jSwKA6UlkjHuqmgZcPeY7DxzO I527Vpj4YlMmK+NwDxWuWuL2jzRXPBfa1GXkjw5WtJTqO3EOEUYOhy/0ieitpsqXWGxQ /OYxu49IXfLq1+YzrROvYpT3LyQzO3XZzftFohTTVRQGc6KisIh1PUDSBLIKKWtvbOxf MaNH6qP0GQGJEj0Fmt5z/vqAPulC6fszq4aXwBZ3hhpUOFytvHzuwkz0so+SpYkCl5RG t2h2mlFXF8+cdNBkM6DJn1VX2mejLI86PVuKsijPZt8fimCyC25oU78Xmoy+qQlrJbAE Ec2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WpaQTjLfV7KuSsjB4F9wP9EPb6gXE6IBxqNf6Q1HCtA=; b=qPKWmfiaBdTwVXy4OM4ap0ZSBXeMyLT4Qvcx5L3hKvFnyqo3P+vPK9Lz7Qo/2JGfdD Dl3USRWN9AOFtABFAPxMk1a8emQ6QTbmdg8n7PQOsKTJ+PRGt2rXgGGRtEow6UACNmpe PQwViJnouk9vJLQ8PIPMEuPiBIcr8efLq/w2q8qoOTs2MQSfHQaBfhdsWVSsBWHNpntm ZJWz4AbCTWoWnN814FjfOJ0LNVZtC+KlwsPCj5QPkcGutekyBHS/PQUUQOxrUsva3hPg iJwA1zuDtrvXQYhwusmjhKAqQrOcRplmqaAm5xvr3UPAASbCDCjp7xa0lxMiOLtt0fDM dDwQ== X-Gm-Message-State: AOAM533OtP+btKDHlyokG5ubLI9fkvvrX3Ah6HKHJw9tfbTJDQPTF8D3 Er+AehOzhrpobuPydWcaz2Xxt8UORGSJyUpmSXE= X-Received: by 2002:a62:2587:: with SMTP id l129mr18131209pfl.47.1598557752461; Thu, 27 Aug 2020 12:49:12 -0700 (PDT) MIME-Version: 1.0 References: <20200827192642.1725-1-krzk@kernel.org> <20200827192642.1725-6-krzk@kernel.org> In-Reply-To: <20200827192642.1725-6-krzk@kernel.org> From: Andy Shevchenko Date: Thu, 27 Aug 2020 22:48:56 +0300 Message-ID: Subject: Re: [PATCH v2 06/18] iio: adc: meson_saradc: Simplify with dev_err_probe() To: Krzysztof Kozlowski Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Peter Rosin , Kukjin Kim , Michael Hennerich , Kevin Hilman , Neil Armstrong , Jerome Brunet , Martin Blumenstingl , Marek Vasut , Maxime Coquelin , Alexandre Torgue , Beniamin Bia , Tomasz Duszynski , Linus Walleij , linux-iio , Linux Kernel Mailing List , linux-arm Mailing List , linux-samsung-soc@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 27, 2020 at 10:28 PM Krzysztof Kozlowski wrote: > > Common pattern of handling deferred probe can be simplified with > dev_err_probe(). Less code and also it prints the error value. Reviewed-by: Andy Shevchenko > Signed-off-by: Krzysztof Kozlowski > --- > drivers/iio/adc/meson_saradc.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c > index 93c2252c0b89..a9d06e8a576a 100644 > --- a/drivers/iio/adc/meson_saradc.c > +++ b/drivers/iio/adc/meson_saradc.c > @@ -719,11 +719,8 @@ static int meson_sar_adc_temp_sensor_init(struct iio_dev *indio_dev) > if (ret == -ENODEV) > return 0; > > - if (ret != -EPROBE_DEFER) > - dev_err(indio_dev->dev.parent, > - "failed to get temperature_calib cell\n"); > - > - return ret; > + return dev_err_probe(indio_dev->dev.parent, ret, > + "failed to get temperature_calib cell\n"); > } > > priv->tsc_regmap = > -- > 2.17.1 > -- With Best Regards, Andy Shevchenko