From patchwork Wed Nov 18 14:29:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 327425 Delivered-To: patch@linaro.org Received: by 2002:a17:906:d156:0:0:0:0 with SMTP id br22csp463757ejb; Wed, 18 Nov 2020 06:29:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDPnXw7F/dvNzfjqngutLhuAn347lUp8v4ETYqe5rnMsa/MG/ZSU7kQxr3NY5g4DRUY0/h X-Received: by 2002:a05:6402:21a:: with SMTP id t26mr8835091edv.173.1605709767898; Wed, 18 Nov 2020 06:29:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605709767; cv=none; d=google.com; s=arc-20160816; b=imMqp03BIajI6D0L2hIx1ndiHFoDCK418GI1/RcEBXeKtudgwyu4Wkz8udw5f+cFUP 6UGuN1+N3zGmEZ/lz6JHVeYCoG4hVe2u2DVaiwKLongFmD/nDifLVrcQOyn+GSnXs4CX fDTIsgiXz4ZohZD6JOhEcPfhsDEKBF7b7fSk95gGGy+EA6EEp56EN9YKaNJ7k5eYwbMv rP9LcGaO/a07CnCNVaZRmy9F6rtfaTP0AGJ3xSWT8YJE8gMGiC6zTVcyxMcvke3PVJoC JhAzDkauNgP6FQxHdCQMK507+g5yNkVl1fkbAkagR4NCDI8hGduX7M+CNqn58T+FrJej L/tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=KIaOUjZAqHDFMPJ7onsZXDxLWHV4cStDELc2Qb5T0ig=; b=QtVnR3K29Ey5/t3KmNHLqbfIn1DZanD4Cu4rmzNAq0eNTpurSllH9KGnZ5t5+NBFOI +kDLwYoCUAplqsQ5b+fxUSy8D/NoeNQQPh4Cpv7jTSvhNGI+cOmnBgwdcQEEL4SNSSBT GfvrpNHN7u9k67hLQu2n58IDxwnZ9NFacUP1amDCF4/NrHIuP3ul591kc4xEawUQkJsv NXGXExKOXbzWDJhJ1Xdf/wTTgVU1TMYLauNZzEuB2KAHHi9AbA93fSsNV0Ww/b2VY/RK d5uQ/hUnxWMW/46tXnPGm1PZduJl2T7MLnPf1nBJXsAvK9G5gQocFO7i7XEaxnyvdUqo vmiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="OO4/2RBX"; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qk1si14793185ejb.260.2020.11.18.06.29.27; Wed, 18 Nov 2020 06:29:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="OO4/2RBX"; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbgKRO31 (ORCPT + 3 others); Wed, 18 Nov 2020 09:29:27 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:34074 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725834AbgKRO30 (ORCPT ); Wed, 18 Nov 2020 09:29:26 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0AIETOB6103990; Wed, 18 Nov 2020 08:29:24 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1605709764; bh=KIaOUjZAqHDFMPJ7onsZXDxLWHV4cStDELc2Qb5T0ig=; h=From:To:CC:Subject:Date; b=OO4/2RBXs5a8u3LqP/4oTa2DdhJL/TvXOrneq/QPkZiwRJr67QNuBvqguxNC6jtKy tGvJFRMUb0bocIZVqKUpBxjV8qCrFPxjETxKbTBogZoySV/HLQfKeyJRzCujnw4DAr Cen271mFS/o2dM3fyI+ZHrS0cRDWGDcWtxkX6U2E= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0AIETOJo035215 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 18 Nov 2020 08:29:24 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 18 Nov 2020 08:29:24 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Wed, 18 Nov 2020 08:29:24 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0AIETNRX107661; Wed, 18 Nov 2020 08:29:23 -0600 From: Grygorii Strashko To: Linus Walleij , Bartosz Golaszewski CC: , , Grygorii Strashko Subject: [PATCH] gpiolib: do not print err message for EPROBE_DEFER Date: Wed, 18 Nov 2020 16:29:17 +0200 Message-ID: <20201118142917.25752-1-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The gpiochip may have dependencies from pinmux and so got deferred. Now it will print error message every time -EPROBE_DEFER is returned which is unnecessary: "gpiochip_add_data_with_key: GPIOs 0..31 (gpio-0-31) failed to register, -517" Hence, do suppress error message for -EPROBE_DEFER case. Signed-off-by: Grygorii Strashko --- drivers/gpio/gpiolib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 089ddcaa9bc6..fd2c503a6aab 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -771,9 +771,11 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, ida_free(&gpio_ida, gdev->id); err_free_gdev: /* failures here can mean systems won't boot... */ - pr_err("%s: GPIOs %d..%d (%s) failed to register, %d\n", __func__, - gdev->base, gdev->base + gdev->ngpio - 1, - gc->label ? : "generic", ret); + if (ret != -EPROBE_DEFER) { + pr_err("%s: GPIOs %d..%d (%s) failed to register, %d\n", __func__, + gdev->base, gdev->base + gdev->ngpio - 1, + gc->label ? : "generic", ret); + } kfree(gdev); return ret; }