Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2559183pxb; Sat, 25 Sep 2021 10:35:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGBU9L17vHsRPuzqNOOLTmneZfKFJJ0yS61vPN+uL15X4XSWu6NpRH+7ukWajZXTQpLy4K X-Received: by 2002:a5d:9319:: with SMTP id l25mr13922348ion.208.1632591328733; Sat, 25 Sep 2021 10:35:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632591328; cv=none; d=google.com; s=arc-20160816; b=Nifam2ARocHBP+F/vk82QZDKQGGCILwnjpS2Ra7sN6OSQTDEIcVo07UQv7IDr/iSHu /v8sBOTO+SA48RnwH0/bVLPkaDvOX/Xx0zvpIadNUa2cX1seghFg98goUiQVZ/N6JPED wU5oEfZ1HpCpytpDI0nEynBjQST9KHZQPJfIWNNN+/HXU5UZOTIxB/1FRbwVv8fy2Nlh lxMcgdlcfR99R9bgAgM5x+GVao4iZke6RcphtlWvVbedZ/lveV40z1wmnWM82ompoOno 104tXIz+hQoOdf7vzpO0IDhuHzSRWNEQJnrdRveVUNzpqjsDJIYmZf0tZbxAl5/wAB07 rLAw== 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=gkBWlplztzPYq7xEWUT333cO8AXxvEK462eV+xY6d3Q=; b=nWNvOcRGoJl78kCKQvWBF9TsAKPYdnKC2UM96+ob1AuYNWOoLzvJj6DuB4KyPNmRXc EwewbCBBNUEqNtDOnpj9/1RsEjcZ3ujA6CxVS7OneItHRXcimdC6TrMCIIKLaSMP7qLk DA5qu9WYe88hEwcOoxwy9s+/pOSVJg7eoLd2NG5/j9POgQZjJk1ag8gssy1h5/JjjTJH IV0g/fpKVP8IpqjPmvDwkOlO5zkw9GIxd8jZxsz0s+0Iskz0n/4xnM2kMVsn8o0mxjFi p3wbqt0b+VgbgLiZYuxBFlzK6v3n+iX7m0DM6H2lcuaLYe3dcp5wHhzeypmrxWPT6elU XxzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CmboLcZV; 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 n32si7917459ioz.14.2021.09.25.10.35.17; Sat, 25 Sep 2021 10:35:28 -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=CmboLcZV; 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 S229687AbhIYRfd (ORCPT + 99 others); Sat, 25 Sep 2021 13:35:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229684AbhIYRfc (ORCPT ); Sat, 25 Sep 2021 13:35:32 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 782B8C061575 for ; Sat, 25 Sep 2021 10:33:57 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id b26so1060241edt.0 for ; Sat, 25 Sep 2021 10:33:57 -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=gkBWlplztzPYq7xEWUT333cO8AXxvEK462eV+xY6d3Q=; b=CmboLcZVzqLZ65pb77dGE9Tb+zbVPpRadSvxK+GRWbZ0/PMacdJT4C7khWZgMHDu3u SXZaIJ4/TuZJqyc3/nqA4JgSQVT9lmUKDqhh7WmnB2v87/FKi8hFYvL0ZAfKJOXHmcpi FzgRz8SGJEqBXnBylB7zICXbT67RqdjT7Zysr1wDhxzKOaEiKU1mPeFlQf8G59TWhhgB lDcZbS2Ty/cDYSfNEwSK6JS5V/I5lOpmpYnRCSDJSqVlu6qfPaqX5PydiG/gLV7zptvb ihFIpmYUpM7yzg4wIHkx+2IKiqJj25xJW5Illgh0Ad27FraOeJg3NTtMTjH3nV970yvC QNuw== 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=gkBWlplztzPYq7xEWUT333cO8AXxvEK462eV+xY6d3Q=; b=7Ob/cgjRu3jjEmsadcaYfiQyWf0ACR984ohKPRQHwjU56Od4CeDXKZsnlqm6ZVfMfO rIN3VpZzbtFMqJLBavVov+g0zGf0ZDTeJ8aI9MZKC1bic0lfBDmGx4jV0IFVuNSsPMa2 bZb4nN0NLgYxKChF+C02CQqsXxCoGpn4oExmKbox7PasKGSa1n6YQGjRFiP76YKQfIeW RjFBDQ4ZkgrCsiElKdk7VFvonCRNunePkP8xnSMOXDg6VWoNHwbdOCYMW6viO/YXJa6X nsYrUMmharbU926qv+VhojekUTV7tHcAY/cBwmYPfGZTNY7ect+zt7n+h2yr80WkKi/q kuKA== X-Gm-Message-State: AOAM531RsUaOFI4IFragxiQhCrXCUcADX7Gqu6NOQOJKZDAz3hcCyF9q bNa+ylLrTa7L3hLaiyA7FhxUijKPB7UkZS7I56g= X-Received: by 2002:a17:906:b10d:: with SMTP id u13mr18123747ejy.135.1632591236112; Sat, 25 Sep 2021 10:33:56 -0700 (PDT) MIME-Version: 1.0 References: <20210921212732.1334-1-linux.amoon@gmail.com> In-Reply-To: From: Anand Moon Date: Sat, 25 Sep 2021 23:03:43 +0530 Message-ID: Subject: Re: [PATCHv3] regulator: pwm-regulator: Make use of the helper function dev_err_probe() To: Martin Blumenstingl Cc: linux-arm-kernel , linux-amlogic@lists.infradead.org, Linux Kernel , Liam Girdwood , Mark Brown Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin, On Sat, 25 Sept 2021 at 22:42, Martin Blumenstingl wrote: > > Hi Anand, > > On Tue, Sep 21, 2021 at 11:27 PM Anand Moon wrote: > [...] > > @@ -353,13 +353,8 @@ static int pwm_regulator_probe(struct platform_device *pdev) > > > > drvdata->pwm = devm_pwm_get(&pdev->dev, NULL); > > if (IS_ERR(drvdata->pwm)) { > > - ret = PTR_ERR(drvdata->pwm); > > - if (ret == -EPROBE_DEFER) > > - dev_dbg(&pdev->dev, > > - "Failed to get PWM, deferring probe\n"); > > - else > > - dev_err(&pdev->dev, "Failed to get PWM: %d\n", ret); > > - return ret; > > + return dev_err_probe(&pdev->dev, PTR_ERR(drvdata->pwm), > > + "Failed to get PWM\n"); > > } > From functional perspective you're patch is looking good now. > I just noticed that the coding-style in the pwm-regulator driver is > not not use any curly brackets for the if block when there's only one > statement > > with the curly brackets removed (and if there are no other changes to > this patch) then you can add my: > Acked-by: Martin Blumenstingl > Thanks, I will update the patch in the next version. > > Best regards, > Martin Thanks -Anand