Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp245459pxu; Tue, 1 Dec 2020 10:09:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5qNajCVcN6Ze2xR0nv6lJZX50XACuyclLS/Y+l0VQylV6ccYTPjB/Num/mLzCCYK8EwqF X-Received: by 2002:a05:6512:3e7:: with SMTP id n7mr1724135lfq.585.1606846175248; Tue, 01 Dec 2020 10:09:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606846175; cv=none; d=google.com; s=arc-20160816; b=HyNou3HslVG9CJXI9w6PKkZi3iKgHWUoUslg0cToqNMlVjAWfwpp+q/qxVvXpTMiaI az6zK4jP02ZoT5t9WSS+zLxWOsv3e8kyqkmnDjV/dXpHH6mehtciadTx62dF//OErnpX kknpOMavkI+4c7hfqoDv8y11STpp4lEIN4MSk8VLi4AAIfoCuXpA3YyesROJSdw53D0s +Kvze0Szqzek+Lf/gmmcaR0NVvR1dnQLWyXEJztVEqUY2HJIvERrl8AQ3c+jFdZxWzEP azRkTiGPLEcn+E5MMybmAnAePiaU2242rcHpu58dQBpSCFZ5bmeW6KvbdkKo1bAmCgQt dDlw== 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=TgW1FQnuQrgiK+Z/NzD7lu4StuId76dlqMcpFgHdPgE=; b=FtX54e4GZmyAKtMya+L8+EKtey35tc+ZvjSArdNASIvZg3ZP/fRT/cK0sz34ZIm6a+ zedW1shcGwvr4PSj64OoQ+SMKCe45UOejFWiKz6mm+pb9yI8IiyOqODMlm8MY7IzYP6u DeAyDDdtN9I6DyH5wDWBb0IGE0tIWbCbsJ+plCjbPsJgSadzwu80wJVh1haXrMdSu5zm zFk17j6wy5wzVTcWWISLJF2czLWlsEp8aKTs0q3vpTKYyDCufn1KhUQF7hlKki62z8Lt NRaftjXpY4FYC3MvwjloW1kOC7XsabIe/nXdxFEniq1WjUWA4okiAtLbctG/I7AaMBVk yNkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=SX8R2HCj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z21si316764edr.365.2020.12.01.10.09.11; Tue, 01 Dec 2020 10:09:35 -0800 (PST) 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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=SX8R2HCj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392166AbgLASEG (ORCPT + 99 others); Tue, 1 Dec 2020 13:04:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388656AbgLASEG (ORCPT ); Tue, 1 Dec 2020 13:04:06 -0500 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C30F9C0613CF for ; Tue, 1 Dec 2020 10:03:25 -0800 (PST) Received: by mail-ed1-x542.google.com with SMTP id l5so4582264edq.11 for ; Tue, 01 Dec 2020 10:03:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TgW1FQnuQrgiK+Z/NzD7lu4StuId76dlqMcpFgHdPgE=; b=SX8R2HCj3E6TK16HzCLIiiaA/lc8URSZ25p/usXodYxou4SmJ+kvSZ4vkMYQzIe6qU WEEwaGi/fmyr9BZUFkvUWvir11iQ+vawxaX8QlmopOlfLEM0qqzqgZiXBBFuV33VyYI1 sea4iuAmvUvhJHLhywz4iiPfN4weGnoQFAOQQRDVyNLT0Q610vNiz7p0UuMruJu55Eq7 /d4e69E9zHAxchZOqomlonhaVnKN0VBCnj+WaBGmt9+f7sbGAXgycv9v78dI9hGHp5ej N+EMP8ltrgNhOk8GqbGXqHYFbzWKLHwHW35PzgOfeJHHm7wDvD3HGE/M07QzwSp/90H7 csbA== 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=TgW1FQnuQrgiK+Z/NzD7lu4StuId76dlqMcpFgHdPgE=; b=MbgRP9lsnXdZ6sBdqYX125mNXwnl6cVN6HHUrL0t0w7w2kFuKkAZpkW8mjz4bLvDTp QfniO1mYdOyVyb034FKej7OmdsNYDWCRlR7gkaZvCrYFwmNQeAOJX94INsI/QKcp7u5U 5hz+RKIH4CUFDfSgOFFnCNkUzcO6wErE3Zl/K/XCZvcaS72wltky7eF0TuGenkAtgqoU fNxWdq+iUNV2C83rSmtepzu7XlOlqYejp2YTjQuGbYQbcv6qr8Hek9gBWn2u1+iZnWaZ HHYEOYCPwqs+dEWApua+1RVWZpagWfLusD1xuNnxDozfn6m+4RbNT/Oxp3unEZGuAcXn jL7g== X-Gm-Message-State: AOAM531BO95w0sCu1HkidXJ0N/lFDC+agi4OH97OpLZGbWn0t/Mmn3tq fUFnl2KR59kf3KlTykXKKvfM6UQ8COUhOba3YefprruGC1I= X-Received: by 2002:aa7:d54b:: with SMTP id u11mr4267700edr.341.1606845804485; Tue, 01 Dec 2020 10:03:24 -0800 (PST) MIME-Version: 1.0 References: <20201118142917.25752-1-grygorii.strashko@ti.com> <69388132-1a81-e222-76fc-5d3b860a2d53@ti.com> In-Reply-To: <69388132-1a81-e222-76fc-5d3b860a2d53@ti.com> From: Bartosz Golaszewski Date: Tue, 1 Dec 2020 19:03:13 +0100 Message-ID: Subject: Re: [PATCH] gpiolib: do not print err message for EPROBE_DEFER To: Grygorii Strashko Cc: Linus Walleij , linux-gpio , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 1, 2020 at 6:16 PM Grygorii Strashko wrote: > > hi Bartosz, All, > > On 18/11/2020 16:29, Grygorii Strashko wrote: > > The gpiochip may have dependencies from pinmux and so got deferred. Now it > > will print error message every time -EPROBE_DEFER is returned which is > > unnecessary: > > > > "gpiochip_add_data_with_key: GPIOs 0..31 (gpio-0-31) failed to register, -517" > > > > Hence, do suppress error message for -EPROBE_DEFER case. > > > > Signed-off-by: Grygorii Strashko > > --- > > drivers/gpio/gpiolib.c | 8 +++++--- > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c > > index 089ddcaa9bc6..fd2c503a6aab 100644 > > --- a/drivers/gpio/gpiolib.c > > +++ b/drivers/gpio/gpiolib.c > > @@ -771,9 +771,11 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, > > ida_free(&gpio_ida, gdev->id); > > err_free_gdev: > > /* failures here can mean systems won't boot... */ > > - pr_err("%s: GPIOs %d..%d (%s) failed to register, %d\n", __func__, > > - gdev->base, gdev->base + gdev->ngpio - 1, > > - gc->label ? : "generic", ret); > > + if (ret != -EPROBE_DEFER) { > > + pr_err("%s: GPIOs %d..%d (%s) failed to register, %d\n", __func__, > > + gdev->base, gdev->base + gdev->ngpio - 1, > > + gc->label ? : "generic", ret); > > + } > > kfree(gdev); > > return ret; > > } > > > > Any comments for this patch? > > Note. Modern dev_err_probe() seems can't be used as gpio_chip->parent is not guaranteed to be set and > it's not clear if chip_err() still can be used at this stage. > > -- > Best regards, > grygorii I applied this patch now. We seem to have a patch congestion on the list - I'm trying to get through unread email but more is coming everyday. :( Bartosz