From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29356C43460 for ; Thu, 29 Apr 2021 20:54:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0CC6F61445 for ; Thu, 29 Apr 2021 20:54:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233729AbhD2Uz2 (ORCPT ); Thu, 29 Apr 2021 16:55:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233097AbhD2Uz1 (ORCPT ); Thu, 29 Apr 2021 16:55:27 -0400 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C23AAC06138D for ; Thu, 29 Apr 2021 13:54:40 -0700 (PDT) Received: by mail-ot1-x32d.google.com with SMTP id z20-20020a0568301294b02902a52ecbaf18so10252140otp.8 for ; Thu, 29 Apr 2021 13:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cDEQYYCABMBKlLd20tFhLfZu2zu60qgD4qzCgh4a7Hs=; b=DuAjdN32RcXze+taixHhxgfk+J8jEGyrIP07wW6CuRJlnkwYge0i/2pVD3UWE00LPu 2flBNq/HqM9PGCVOSQWWXLDOWL2LXZ+8OWH564Jz/f2/RuF7rOr3X+xmikVY9yjiXFHu Uy5t2Ep3oGnuPCWrbpmv0BXDicBzrU7UYFgvFMEG6yYstAhpThE3oANFC9alPuOBjjN0 eOa4614uUoD7/6gx2klBruypLvTfZiCHOJx1aF1Fdz27XD8gyLUSkMpeT4o20YnIccPz VdREWbe+js7q1E8RdxjeMb7FknGneURiYzQyhC6WXvxSVPdUNS3hPBZz4eRMuc0Jlsto Bweg== 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=cDEQYYCABMBKlLd20tFhLfZu2zu60qgD4qzCgh4a7Hs=; b=F+rnyvSxR9ojiiCe6cLUsVe1GOd0TgVLI504VYMDq9RYQhUxIh+gtJPL9JA1EdZlXh DDqnj3hFq3YgcJxYBfGh5ZlUIHvxuYrrhacOWaUYhJvYBz+fQazKRyaaFvJt3OqSjsA3 Hdo2k8WQKmCSHJmKnU97hKMJ1tlmNDCux88anwScI4J1Clt6tMh188a3WDzgO74EJQRW sk9+b/g3iI2mXVKZU5mzpP9MENtxhDZxkkmTFiBMy2pCPgypj9eL4adCOo1N7pMLoeQ4 CRDilvJFommCU7XK0oAXqLFDCOvrFpEu41ZHbAr5l8CfgoKgg0KGApSaiCwopowDle/m cHzw== X-Gm-Message-State: AOAM532w38g2+CyjyU43d4KVS5r4wKkaanb4QDny7Bu00FNZTzBonm+2 VEliTcX2aVt4RnjEJ+eJUivL1w== X-Google-Smtp-Source: ABdhPJwb1Us3vfLjZyNwGpHnKQtg+2ziIVzR4m/46fSQ3cNvwsZZhbPQrBPKVaThPYh2I7jxQRlUIA== X-Received: by 2002:a9d:17e9:: with SMTP id j96mr1019565otj.143.1619729679793; Thu, 29 Apr 2021 13:54:39 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id i9sm200057otr.19.2021.04.29.13.54.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 13:54:39 -0700 (PDT) Date: Thu, 29 Apr 2021 15:54:36 -0500 From: Bjorn Andersson To: Marijn Suijten Cc: Pavel Machek , Dan Murphy , Rob Herring , Andy Gross , Thierry Reding , Uwe Kleine-K?nig , Lee Jones , Martin Botka , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-pwm@vger.kernel.org Subject: Re: [PATCH v6 2/4] leds: Add driver for Qualcomm LPG Message-ID: <20210429205436.GA2484@yoga> References: <20201021201224.3430546-1-bjorn.andersson@linaro.org> <20201021201224.3430546-3-bjorn.andersson@linaro.org> <881fb5a3-fb51-3967-63de-a09950839855@somainline.org> <20210428223939.GN1908499@yoga> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu 29 Apr 14:31 CDT 2021, Marijn Suijten wrote: > On 4/29/21 12:39 AM, Bjorn Andersson wrote: > > On Sun 18 Apr 16:54 CDT 2021, Marijn Suijten wrote: [..] > > > > + ret = lpg_init_lut(lpg); > > > > + if (ret < 0) > > > > + return ret; > > > > > > > > > How about turning these returns into dev_err_probe? I'm not sure if that's > > > the expected way to go nowadays, but having some form of logging when a > > > driver fails to probe is always good to have. > > > > > > > The intention is that each code path through these functions will either > > pass or spit out an error in the log. I looked through them again and > > think I cover all paths... > > > That is true, all the errors not covered are extremely unlikely like > -ENOMEM. I vaguely recall having to insert extra logging to get through > initial probe, but that might have been something inside lpg_add_led as > well. Fine to leave this as it is. > When kzalloc et al returns -ENOMEM it will be done with an error print, so that does not need an additional print. That said, another pass through lpg_add_led() made me spot that if you get a parse error on the "color" property we would silently return -EINVAL. I've corrected this. Thanks, Bjorn