From patchwork Tue Aug 8 18:07:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 711728 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 771F7C001E0 for ; Tue, 8 Aug 2023 21:03:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235124AbjHHVDO (ORCPT ); Tue, 8 Aug 2023 17:03:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234339AbjHHVDE (ORCPT ); Tue, 8 Aug 2023 17:03:04 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15A425FAA4 for ; Tue, 8 Aug 2023 11:07:44 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-564ef63a010so91755a12.0 for ; Tue, 08 Aug 2023 11:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1691518063; x=1692122863; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=SNB9PBX+R84ecp55IsFR5qJhn0vu2a9VSkor2FpXx8U=; b=Nha62rvCE/kmQFNXWjQcNi9k9PPUMxjF67zkzDv0x7DNw65HN6GLmgtrvtpRfrpBFL +VCsfNVazlwFfjbPZYQglUZGB85euWgeyXLOajbaHtkViDW2iu7BbCrWarWq7zRsG0Qg 5oUB5H4Vpqp9Y5noXK6CmJpXvgNGlAn2CxW/s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691518063; x=1692122863; 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=SNB9PBX+R84ecp55IsFR5qJhn0vu2a9VSkor2FpXx8U=; b=BuDHRBxS316bgfZcE/5IovIyfFTHg9wN+3/fYk+S+oAYigQE5dPWbJIwFG0aCuuA2s sBDYW8S8ftJ7Kfvn/b0j4UNLXVmBROcqynioRcrHIxJpdSwt05iKUQ/M9D3NmtAukx0k LWjXDflUfoE431mM0nya8IP9r3G3VQXurjdPNwxzsQ4qZ6Y957EV8/IjodCj0+iANFQB fb0bw96DPwuasIkjfLA6IBCcDMrNZmF92TdJym7Kk/jZrj6eRFm7Q1kFTFsCDM2oDJeJ F3f8miMQSuEP9MuNMSLBj641DPKgISD0hQCiRAknOEzGlSu9pKyso1dRWREV0fn+Qd3l QpMQ== X-Gm-Message-State: AOJu0YxKTb2TNSg5Zr8GeiWwrkCqS8a2SS/v1rFm6A4YqRKTYGu6lwsT OtK6SdFdnCCREPPSX7K50EMzow== X-Google-Smtp-Source: AGHT+IG0HmGIL7nO84nsLyrRwT8W8ltx+IezVllaebNL5g7CayrjkjWph4OiWB61+HFtyQnIVp2Pog== X-Received: by 2002:a05:6a20:8f0c:b0:138:68b9:138e with SMTP id b12-20020a056a208f0c00b0013868b9138emr14627624pzk.8.1691518063452; Tue, 08 Aug 2023 11:07:43 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 11:07:42 -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 1/2 v2] pinctrl: iproc-gpio: Silence probe deferral messages Date: Tue, 8 Aug 2023 11:07:32 -0700 Message-Id: <20230808180733.2081353-2-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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.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-iproc-gpio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c index cc3eb7409ab3..0e3f787b93ef 100644 --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c @@ -891,10 +891,8 @@ static int iproc_gpio_probe(struct platform_device *pdev) } ret = gpiochip_add_data(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"); if (!no_pinconf) { ret = iproc_gpio_register_pinconf(chip);