Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp217566pxk; Wed, 16 Sep 2020 02:33:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQMMFulGxMa2RxiWCoB4hdtfJ/BdID+0YfeMUE2xtNf5lCSKI6igPTQuHMX+O9JoJPJdfT X-Received: by 2002:a17:906:364b:: with SMTP id r11mr23948008ejb.48.1600248820889; Wed, 16 Sep 2020 02:33:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600248820; cv=none; d=google.com; s=arc-20160816; b=H8erhxbjbctop5QI0ghh3Yr9kvQeindnQwAV+3We3DAawEgkQVXpksCOaUGaO6So4h SNwlHzYl2g06JMAwO+bUVyJt8JWYn7Xvk3+7J+xB+PtFmEhQ7WKwEHLm3YUcIg9fc9gh 2zsjmrjltot5iOE6W2WvjxKu4193jmwHa8+dqeoUzuMacTvRjFFUSsroHM/NtqKg92CT BvXB/v6yZCqKJD8KMnpyBW1+u+n9BG1jit09IfqRCm8KYUdiXrhtWNFPqEk5iNla/Jsr k4etukvAFn1HSMkeWDTobcEEWh80NyHMsxfBhcunEmRUMIZF2cTwYQkaHVCj2k361bHk tk2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=YjecuPhauQHL4j4Z2a9keky4ajO3faW/VO0iw9ZMsyw=; b=aaKF9xp6tbyugy1glVJPDgvGDYVrW4S6fd74L5ddzoIv7FKi2B6FRXJQxqPLc2EzHB utFdrTwgUB7WKgEqt0ALByqxq9sbhSRWN6kz0AkOYOZti85+7eUFtfIXC/5SRF+K7ZBJ Za59Iu3sYmPeQ0Cek4Qv3NOZM2jCH8Bg6b/NztE7RdbruRv7LdGxQvZo+dR8K6XvH/jp khGC9QYwjL+h++OVhMdcY9/fXRscQuWUR2DgpnsSv7yyHixNIvqpzSzj6+XZ0GdPgV6n Y1nWTgo/yyVsYxxV9zW53E0X8t1Ef0rp0gaAJRbbiFFkF+oLgZjKPodKQWkyzeJjd0WC A/6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A+yh78E6; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 u15si11296096edo.55.2020.09.16.02.33.16; Wed, 16 Sep 2020 02:33:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=A+yh78E6; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 S1726570AbgIPJdP (ORCPT + 99 others); Wed, 16 Sep 2020 05:33:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726425AbgIPJdO (ORCPT ); Wed, 16 Sep 2020 05:33:14 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A109C06174A; Wed, 16 Sep 2020 02:33:14 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id e11so1817902wme.0; Wed, 16 Sep 2020 02:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=YjecuPhauQHL4j4Z2a9keky4ajO3faW/VO0iw9ZMsyw=; b=A+yh78E6fm9DBZfbdqzQH+qzcsEGu6J4+jBTWy2YENyyyt2Zbq0S/OFMY+YMWluCW8 z8t3xi+iP90JmyDxktlPvCO+1T3U3hFBPr8qrN+yRgMmJ0GM2L7qRI0Eo3AOZ7RMkQPe LWE3uzHR7S4jsQzPTnyioG1nqAXIH9Jsv1zZo5fzHTOi1paYswkOFIvKmndmutMHCR0b y7j++ofj0gze7dcveAmPNZVSNVJ8f7dc9HkoqOY5StLB4q0UsS53QODCjO0b8LP6kuiJ 8vHisP+2YnnZzbQCZ5tRX2F0md65KbL3npfLcO72aSz6q9hmrXsAZ2AjIqklFE2qGRqP eeXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=YjecuPhauQHL4j4Z2a9keky4ajO3faW/VO0iw9ZMsyw=; b=DD3rdSDtqTIWqRQM9vg+LtAgbYXATRxYYPW1fg+f8mAsYcaMqIrs10gJyvfl5MLKnJ dkM17lKEggN/R6ZmcHh3H8iCFnNgnEm3u6VTkcN9o95KfIjxsqEWmH6uxUP8L9mMHW3f yh49oXBkVdN/BEIRCGk7QYqxcqCPajJSvnel/XHkhfFITNZsyA1P7vbKDO3UHwqm0sdr geWFEeSkk1PYqhNHdVBzugBqifjlaGMWvcYIlcPseqmznjjmSu511u3HnGM1rcyRv3sG rqkgApHJhSA9hBgdDStlpzPxuNfCs2fG43dYDrPTY5dEhuPvUu0vSKXXh9XvMBkeGXiF 7KuQ== X-Gm-Message-State: AOAM5307yMWX1cOViO3Fyjxx/FPl5O6YHzByNAXNnq7QdxZSEymaia0x YtWb9c1EftKrWrKe5/U57p4= X-Received: by 2002:a05:600c:2047:: with SMTP id p7mr4017341wmg.168.1600248792836; Wed, 16 Sep 2020 02:33:12 -0700 (PDT) Received: from Red ([2a01:cb1d:3d5:a100:264b:feff:fe03:2806]) by smtp.googlemail.com with ESMTPSA id u8sm4171183wmj.45.2020.09.16.02.33.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2020 02:33:11 -0700 (PDT) Date: Wed, 16 Sep 2020 11:33:09 +0200 From: Corentin Labbe To: Krzysztof Kozlowski Cc: Herbert Xu , "David S. Miller" , Maxime Ripard , Chen-Yu Tsai , Horia =?utf-8?Q?Geant=C4=83?= , Aymen Sghaier , Maxime Coquelin , Alexandre Torgue , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Iuliana Prodan Subject: Re: [PATCH v2 4/4] crypto: allwinner/sun8i - Simplify with dev_err_probe() Message-ID: <20200916093309.GA11483@Red> References: <20200910192919.12503-1-krzk@kernel.org> <20200910192919.12503-4-krzk@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200910192919.12503-4-krzk@kernel.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Sep 10, 2020 at 09:29:19PM +0200, Krzysztof Kozlowski wrote: > Common pattern of handling deferred probe can be simplified with > dev_err_probe(). Less code and the error value gets printed. > > Signed-off-by: Krzysztof Kozlowski > > --- > > Changes since v1: > 1. None > --- > drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 9 +++------ > drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 9 +++------ > 2 files changed, 6 insertions(+), 12 deletions(-) > > diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c > index 138759dc8190..e3c62051c595 100644 > --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c > +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c > @@ -573,12 +573,9 @@ static int sun8i_ce_probe(struct platform_device *pdev) > return irq; > > ce->reset = devm_reset_control_get(&pdev->dev, NULL); > - if (IS_ERR(ce->reset)) { > - if (PTR_ERR(ce->reset) == -EPROBE_DEFER) > - return PTR_ERR(ce->reset); > - dev_err(&pdev->dev, "No reset control found\n"); > - return PTR_ERR(ce->reset); > - } > + if (IS_ERR(ce->reset)) > + return dev_err_probe(&pdev->dev, PTR_ERR(ce->reset), > + "No reset control found\n"); > > mutex_init(&ce->mlock); > > diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c > index 9a23515783a6..576df8c8df51 100644 > --- a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c > +++ b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c > @@ -545,12 +545,9 @@ static int sun8i_ss_probe(struct platform_device *pdev) > return irq; > > ss->reset = devm_reset_control_get(&pdev->dev, NULL); > - if (IS_ERR(ss->reset)) { > - if (PTR_ERR(ss->reset) == -EPROBE_DEFER) > - return PTR_ERR(ss->reset); > - dev_err(&pdev->dev, "No reset control found\n"); > - return PTR_ERR(ss->reset); > - } > + if (IS_ERR(ss->reset)) > + return dev_err_probe(&pdev->dev, PTR_ERR(ss->reset), > + "No reset control found\n"); > > mutex_init(&ss->mlock); > > -- > 2.17.1 > Hello Acked-by: Corentin Labbe Tested-by: Corentin Labbe Thanks