Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3064477pxb; Tue, 21 Sep 2021 13:45:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWxkuuQgsFzqpt7ug3QjPBj1QORmLxBBig9qpGVWUU/IDhfE3mBfC+xBRxAs3xwI2mT05n X-Received: by 2002:a17:906:ece1:: with SMTP id qt1mr36773452ejb.281.1632257132118; Tue, 21 Sep 2021 13:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632257132; cv=none; d=google.com; s=arc-20160816; b=j2Eci/b11dk11UMeX0Lg/JXHvs+8NEUuKtcZGggBeqeeu9mPoNPQzfuPfYZodd3STN 3QhddZ6WcuGcjwUzhh++vwpCY6gE9kQxqCIsAIQ1fAhfL1r+QkfucZDEYx1uWUFzdXSP gIyC8rjpFj6Jxt6UTwegI89fnY//hxn4gJvTsWaDZcMBK4eoc9V0YxiOtghz26SH/8vb Bh98cCkQyubjoAimhxML+gKmY/VHiF5MSxEhxdmueCs10plrOJVPXRbq6yBCkN16O9ip /05RDDC8qDjrOE7IDTLOsoYQeFqvcP2gOzrEUHVmZBHPdswOO9npJVB7AEa2N8565cvV RciQ== 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=0gRmMl3ATKMwqytANP/bGvh926ut0U/W4MmekIp4BdU=; b=bwYwK7k82JpUyfyexiEF5MfyybGzImuporo9yTfmeK3r8br8+2FEepMULE78KO0wNZ e+Da2zVzDSgnWvRXC8vG4QfuVQs/0YTH+g9UaS1uTjEfaMlixIzBc+FY6/2nx45h6y4V BnoZLaoU0Obtfeb9e34XtQfewJVdYzr9dFGJ+b9HgLnt86jPHOgFIDQQOxJzK4d3cgF2 OBV1p0ahNiBE9Xu+fbY0mfH+CAwEAOVxGftI4CTORrMW+wnhwgYgjSg4AMj8PzyMiY1v 2FXGV630cqxl2kwiWvhW/3ZnAAa5PQo+GWWIvlHTeD36LkEqW5zr/2FvPdG8pmIcnD4o WXqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b=a11YL0Ng; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d13si4365ejz.741.2021.09.21.13.45.08; Tue, 21 Sep 2021 13:45:32 -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=@googlemail.com header.s=20210112 header.b=a11YL0Ng; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232063AbhIUT3s (ORCPT + 99 others); Tue, 21 Sep 2021 15:29:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbhIUT3r (ORCPT ); Tue, 21 Sep 2021 15:29:47 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21E69C061574 for ; Tue, 21 Sep 2021 12:28:19 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id c21so776691edj.0 for ; Tue, 21 Sep 2021 12:28:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0gRmMl3ATKMwqytANP/bGvh926ut0U/W4MmekIp4BdU=; b=a11YL0Ng5emaJ3g6CV3iyFHFoD9QHsGNitdmgIaEuUGCpK6F36173WgPa6n1cP/pdA H47OX35q9mlJQPqNPxk7l2ZADJpYCwfJaLdMFqPUWfsSIj4fo0yi8dY7SebN6jnpUogP gPJSkuugJej9CV/vUe3x2HAibgjkzDOVPdbcoPVfwGeBePWdaioKr8oZA0nhzqAzPm79 IPn3tN9Z0mgcWwkqaGGm6PGqfxGu8LU3548fgymWKO+b2IXwj6LaAGuAGeEzSK9e+XFH 9W6AJTheq9Z1h/Z1a9MXYrGzKgB6hSkEC6phKJyBEp+g7pCDu9fdRDqYzFJUsD8buCM4 kBUA== 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=0gRmMl3ATKMwqytANP/bGvh926ut0U/W4MmekIp4BdU=; b=YFFci3zxD6QZn8fQLWd18GHo45lxLTEWeTOy5hY/+F20nntnnnKdK37F3fMEpb+oxn 9kqpUJfKmMn2g2wumvdPCIbXImhowqMp7Xvr449QWsWjQBE/4FS0ET+7uW7V9/pkZ2+B giXDZNjq/MgQQgrUMwZyWSJCINwAPhEpOVfmTfVG+3laSDwNi6MW7OgwOxcpcgznaLVb OX7DMrayHnH4+sv0Hg5j2f12X4kVTnXh241Hbosn8iZeXUle2qgT07b36lfKFQJdIR/A X1lYXHbaXj2mdcogHJDf+PQLoDI5M2Jvpds5QdHcH8l98vf6eQmKPoLDABO6WtwsPMzr SkXw== X-Gm-Message-State: AOAM531DK6VKC84CJaBOtCj0ssGeuELa4pa4nx3b32LoT6S6t3ZD9bEX AfQ3w0pV/VefG0hdKXb122QcPZ1SeHwoE08zZu8= X-Received: by 2002:a17:906:e105:: with SMTP id gj5mr35812674ejb.408.1632252497689; Tue, 21 Sep 2021 12:28:17 -0700 (PDT) MIME-Version: 1.0 References: <20210920203735.675-1-linux.amoon@gmail.com> In-Reply-To: From: Martin Blumenstingl Date: Tue, 21 Sep 2021 21:28:06 +0200 Message-ID: Subject: Re: [PATCHv2] regulator: pwm-regulator: Make use of the helper function dev_err_probe() To: Anand Moon Cc: linux-arm-kernel , linux-amlogic@lists.infradead.org, Linux Kernel , Liam Girdwood , Mark Brown , Jon Hunter Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anand, On Tue, Sep 21, 2021 at 9:21 PM Anand Moon wrote: [...] > > > - 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 register regulator %s\n", > > The message here should still be similar to the original one since the > > actual problem is that we could not get a reference to the PWM > > controller. At this point we are not trying to register the > > pwm-regulator yet. > > > > Yep, Typo I mixed up the logs completely. > it should be "Failed to get PWM, deferring probe" I think it should only be "Failed to get PWM" only - without "deferring probe". If the PWM is missing in .dts (which is not valid but might happen for someone who's creating a new .dts) then the "deferring probe" part is not correct as the error code is not -EPROBE_DEFER (it may be -ENOENT instead - or similar). Best regards, Martin