From patchwork Tue Aug 8 18:07:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13346639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4FAEEC04A94 for ; Tue, 8 Aug 2023 18:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kGfZavtWFlsCE7GWUIx3o9uyzw2kWyGjgNb9jiuEqyQ=; b=zIvOhtj3ZY6kBruBrm0yuZqJj7 Vo36rFC6KsYNA3TZxfwnlI9zL/LMyCfGyGG782O9G9gTekitRFtGQJKrwkBM70JIzfVg9Y6dQ2ku0 XxeP57Ht0p17I8BksoGwvLxfaHJXVqLSzPNQ+DZVXHXs3Q8AhvggC6TdtlWvSkEKwLzbj1cK0F5IH c9YYIxrRaOYUNnY7/eSCDFr4mwUcaWjdeIh2JMCC4JT58+Zn2LL+QsWnAte3EbjNctUBLaIzfPiiV H9lSZU08djhRhuC5OQlkC7p/uxl81AzXacilB7395YXAjMH6agz0PIK3bPThR09SWbZDLYuNRgc+J Q6zhc25A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTR7V-003BOv-2C; Tue, 08 Aug 2023 18:07:49 +0000 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTR7T-003BND-1U for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2023 18:07:48 +0000 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-1ba5cda3530so4688805fac.3 for ; Tue, 08 Aug 2023 11:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1691518065; x=1692122865; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=4eXEOv3vcj6lH5y/V/iPg+UyD0FGSFEF9yuRZQyr70g=; b=UM1Fxue436HAvCtUsBG8pcQSeiyxKJIDqb4HjSH2Yr3IcgCStrthg/wEbexJgTcf/X KnbGomRBvfjoxWO9t+eOlTSsGKX87xvN8KibxZ83kB/spFmWrMvA6FqbKVmqbaPaZO7S peYH3g9fDXpQ1tOQq9vIAq6OhUM2n46Ijvcfg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691518065; x=1692122865; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4eXEOv3vcj6lH5y/V/iPg+UyD0FGSFEF9yuRZQyr70g=; b=irjVyT6JjFyVLuNbKpNGlBON6ydh62Tw7p83ShG28Mye0QNSaoelZ8UCYyiRHhKK6C 5mU4phqCeRjexym4s3ldWsOt2JbzW3LbDQbDXnwUVZ7lyddHPxT1tlPhrVtVUfuvUjSr 2sBi2cF8Lc4mdrEGR/6DkTJOdZHURVGryy8DM6YMaRW5cOqb/RRccbyWHRLSpa0optw/ 25M+WdRdfZweiG6vKLsVHyTomRVtScldUG7dNVydK0VPKJcYQiobqMbwgKHmjuoMkOX1 w19zzr3OolOiIs3Q4PdDNjRmb+APUBmmlSu2LbW94v3JVOnFo6Ib0BZUGHm+zDhRdiaU ta3g== X-Gm-Message-State: AOJu0Yw83V7fhCpjwSdOYM+eWf4UJNqt4AT9mb5ijTm6DNX+m+L0W4nq OhOwHpsusgGWg/I4sLNF9Ba0iQ== X-Google-Smtp-Source: AGHT+IHhuLVnRDcSLumPi/Vg9K+zEDpXV3RU7k2bFPzcwng+pZLPPiRcpPbJoVnq/6ZMFpj1DNEsXw== X-Received: by 2002:a05:6870:4396:b0:1a6:c968:4a15 with SMTP id r22-20020a056870439600b001a6c9684a15mr422733oah.4.1691518065147; Tue, 08 Aug 2023 11:07:45 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id y28-20020a637d1c000000b00564beacbd20sm6683067pgc.74.2023.08.08.11.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 11:07:44 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Linus Walleij , Ray Jui , Scott Branden , Broadcom internal kernel review list , Andy Shevchenko , linux-gpio@vger.kernel.org (open list:PIN CONTROL SUBSYSTEM), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM IPROC ARM ARCHITECTURE) Subject: [PATCH 2/2 v2] pinctrl: nsp-gpio: Silence probe deferral messages Date: Tue, 8 Aug 2023 11:07:33 -0700 Message-Id: <20230808180733.2081353-3-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230808180733.2081353-1-florian.fainelli@broadcom.com> References: <20230808180733.2081353-1-florian.fainelli@broadcom.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230808_110747_525833_6A1D98B4 X-CRM114-Status: GOOD ( 14.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org We can have gpiochip_add_data() return -EPROBE_DEFER which will make us produce the "unable to add GPIO chip" message which is confusing. Use dev_err_probe() to silence probe deferral messages. Signed-off-by: Florian Fainelli --- drivers/pinctrl/bcm/pinctrl-nsp-gpio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c b/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c index 5045a7e57f1d..7fecd0a10cd1 100644 --- a/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c +++ b/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c @@ -686,10 +686,8 @@ static int nsp_gpio_probe(struct platform_device *pdev) } ret = devm_gpiochip_add_data(dev, gc, chip); - if (ret < 0) { - dev_err(dev, "unable to add GPIO chip\n"); - return ret; - } + if (ret < 0) + return dev_err_probe(dev, ret, "unable to add GPIO chip\n"); ret = nsp_gpio_register_pinconf(chip); if (ret) {