From patchwork Fri Jun 10 07:51:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 1641634 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=baikalelectronics.ru header.i=@baikalelectronics.ru header.a=rsa-sha256 header.s=mail header.b=Qq2AKhXt; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4LKD0165QBz9s09 for ; Fri, 10 Jun 2022 18:00:01 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346871AbiFJH77 (ORCPT ); Fri, 10 Jun 2022 03:59:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346724AbiFJH74 (ORCPT ); Fri, 10 Jun 2022 03:59:56 -0400 X-Greylist: delayed 471 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 10 Jun 2022 00:59:51 PDT Received: from mail.baikalelectronics.com (mail.baikalelectronics.com [87.245.175.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A92152067AB for ; Fri, 10 Jun 2022 00:59:49 -0700 (PDT) Received: from mail (mail.baikal.int [192.168.51.25]) by mail.baikalelectronics.com (Postfix) with ESMTP id B65CD16A1; Fri, 10 Jun 2022 10:52:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.baikalelectronics.com B65CD16A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baikalelectronics.ru; s=mail; t=1654847569; bh=XNpOtewZxQ8gfieftWFIAeUTrkuxCUoFN+kKHGah3qk=; h=From:To:CC:Subject:Date:From; b=Qq2AKhXtK/tgMSF2gW1lG9txGVhdW+t3H2u6KOjFkAMyMNrEB0c3Dc3etejjac4mz XvgQaoaz9Z40G31jt9iOltvPvi5mZxJKY++iYJUPDiQnqDYecJS1/26JxzY8mkklkw JQB6OwukDwgyjvHY5sUjcdWCww94TE5I/yzsXJJQ= Received: from localhost (192.168.53.207) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 10 Jun 2022 10:51:56 +0300 From: Serge Semin To: Hoan Tran , Serge Semin , Linus Walleij , Bartosz Golaszewski CC: Serge Semin , Alexey Malahov , Pavel Parkhomenko , Andy Shevchenko , Andy Shevchenko , , Subject: [PATCH] gpio: dwapb: Don't print error on -EPROBE_DEFER Date: Fri, 10 Jun 2022 10:51:52 +0300 Message-ID: <20220610075152.10214-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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-gpio@vger.kernel.org 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 --- drivers/gpio/gpio-dwapb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c index b0f3aca61974..a51458be34a9 100644 --- a/drivers/gpio/gpio-dwapb.c +++ b/drivers/gpio/gpio-dwapb.c @@ -653,7 +653,7 @@ static int dwapb_get_clks(struct dwapb_gpio *gpio) 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"); + dev_err_probe(gpio->dev, err, "Cannot get APB/Debounce clocks\n"); return err; }