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: 581208 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 2E5E1C43334 for ; Fri, 10 Jun 2022 08:00:00 +0000 (UTC) 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) 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; }