Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2941792iog; Mon, 20 Jun 2022 07:58:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tMYE9RsfoEIcVQQBt1rwDeAJLNvPeZ88KA985VL/BOLmEAEC5FlRD+UObkKgxpkn8vO8ey X-Received: by 2002:a63:b94a:0:b0:40c:e843:a1dc with SMTP id v10-20020a63b94a000000b0040ce843a1dcmr730955pgo.441.1655737099648; Mon, 20 Jun 2022 07:58:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655737099; cv=none; d=google.com; s=arc-20160816; b=zKP65B5ua108cTIhxqzoNv8su3rKgxsmWyzr0jTq2s2uTlnSqehVpM+RakfoPc/De5 pkG7FyIx3Quva5YtvGqTJkc+3PcERkge+FHf5VZMA1qjyQCBM77I79SjRCH2zRORieeM J9vkTKQQoKVMTnTJYLYYQmD3cTw+tXBZAapIXXmN6C8nbLAwCefreyHK3sOnPkWcTgWj Smck3Ia5+Nsu/8RZyhkAgKhxmvVg8N9atIthKziIOVjWrKeUa0oJjm5KWQ0En9FUss9m Y91ZADegX8SpH68OLTowrxLDdxLk9rWJSZkgWR0Dhv8gAcCiiOXV6y/VQOCYRIDJsc7q gGBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nbHnB6DacxpoStw2A2mFf0AlwPKz+9M9VQ1nL9WWETA=; b=PdC/uv6g+uufa4wmfIeE2ZmamGIqFlzkGMdEhg4Qq53sVXUbGtPmNW7X0g5OWh8raB VtznGxtHDxfGtMszvVDNIxmr8tzln+CJmU6JR7BsuYN28eS+/lCB6UDeeIXRdGKjV8Q9 DWlGwh2P33MwZCUMh32NOSSsAVdWvszQxf6562unYy3LeG3JYw4YIDa/raQA1uMr8qUP FVbQRFh19GVHRqAwykeiBngQ5pRl9MJXReP+8lgkOm3S3PGDRTA9nvZrnR+E1ulRS+Wm HcQONiiWN/osXbfzFUp1z99xsE0yZPJJHJwBbcib0yOPhcX6a6zHI7j7KQv12HzaYubx gY+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="hpgL/2Ox"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p5-20020a170902e74500b001587f099641si17964165plf.387.2022.06.20.07.58.03; Mon, 20 Jun 2022 07:58:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="hpgL/2Ox"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243266AbiFTM5C (ORCPT + 99 others); Mon, 20 Jun 2022 08:57:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243295AbiFTM4l (ORCPT ); Mon, 20 Jun 2022 08:56:41 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43DFF18B3C; Mon, 20 Jun 2022 05:55:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6B7B1B811A3; Mon, 20 Jun 2022 12:55:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C068BC3411B; Mon, 20 Jun 2022 12:54:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655729699; bh=Gc6fuGZ+6DADRITiZxkitRn492CZ5PoYNJGVIcbu6d8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hpgL/2OxLikM4KwV8G1cCSmfsXI1cv/0r+a7ZyqFCGgO4NJlXB6Hrt3NhJ3FkTZLW /RH+1Xj1XdCwO3qJ21ogcdXSuo3C7gW/ictYFvYQacFcWgCy1X8TP+FPA+1Bm21cBX zqwQZ+fi3ArQfC+i+ShVvuflRFgVEEwriHv8AdaU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Serge Semin , Andy Shevchenko , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 5.18 046/141] gpio: dwapb: Dont print error on -EPROBE_DEFER Date: Mon, 20 Jun 2022 14:49:44 +0200 Message-Id: <20220620124730.895298056@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620124729.509745706@linuxfoundation.org> References: <20220620124729.509745706@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Serge Semin [ Upstream commit 77006f6edc0e0f58617eb25e53731f78641e820d ] Currently if the APB or Debounce clocks aren't yet ready to be requested the DW GPIO driver will correctly handle that by deferring the probe procedure, but the error is still printed to the system log. It needlessly pollutes the log since there was no real error but a request to postpone the clock request procedure since the clocks subsystem hasn't been fully initialized yet. Let's fix that by using the dev_err_probe method to print the APB/clock request error status. It will correctly handle the deferred probe situation and print the error if it actually happens. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin --- drivers/gpio/gpio-dwapb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c index b0f3aca61974..9467d695a33e 100644 --- a/drivers/gpio/gpio-dwapb.c +++ b/drivers/gpio/gpio-dwapb.c @@ -652,10 +652,9 @@ static int dwapb_get_clks(struct dwapb_gpio *gpio) gpio->clks[1].id = "db"; err = devm_clk_bulk_get_optional(gpio->dev, DWAPB_NR_CLOCKS, gpio->clks); - if (err) { - dev_err(gpio->dev, "Cannot get APB/Debounce clocks\n"); - return err; - } + if (err) + return dev_err_probe(gpio->dev, err, + "Cannot get APB/Debounce clocks\n"); err = clk_bulk_prepare_enable(DWAPB_NR_CLOCKS, gpio->clks); if (err) { -- 2.35.1