Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2470375pxb; Tue, 9 Mar 2021 03:25:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJztrOHg0MvsXbN3AaiTPw6rVnrKjflw9y2eG+llYqD++Vb2QWFv2im+jxIr6znHLsLgDBke X-Received: by 2002:a17:906:5689:: with SMTP id am9mr19004898ejc.298.1615289158433; Tue, 09 Mar 2021 03:25:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615289158; cv=none; d=google.com; s=arc-20160816; b=wCrXjfoFdkN36vShB/o/WgSB7XOsEi2VZupiRNfsEXC4mtdcmUVt0IA4ELqZANKa3d 9Iimjb4GQPuvdW0xPtlGG9puMOpOFbPKsFaax3tOEM+W4+HcGj9JrRyeC/F41vu5AD8J O8Y67RorAZELSgDV3jkSqlbt9+6TPyWPiTwxqyndNS/QGc3i/F0iwPHtT+KdWj3ePLUN 0syDiVZC8eCcUMkKEZ+//wvmU7EgYj3a7M9icILYf51T6568WaDTDfDMmWvyjXhWLeF3 tS7zZ5KEwgpmEmZmD+2JyvKNFCgxXmvdfW6RmcVLdOoZonnSbzzcDiuwlH9KAh4/xQuH 3SKg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=eS1pyBBswwe5zO/yCjWQMC+2IjoFHpKTsEUzbpzcNto=; b=tGccikO4E008K064+/5nBptj5WW0dT3CROMe1YWgdj2WuEURPy3Wy/+VSVFT/fAHSD D4M6WoVZ77fAqiKaNiJ1GuVRrp+dEwl7CjcIwG6Wqw181MInKjzvSqDxZxQDbQjUO9oe DNsGv0l3Cx/0VKg9D67Bn/50YsieD/oaaAMudmdpt/VSEoWe8n+vGTYZvkYBzivrpTYC bBBCHHHZtyM/BP8VQyeIJ1T4jYWyE2UMeaQ9VFTV8rltO9n2G8NDAvPheFDBDIaM8oKZ yqE6Ecr2eZmu1oZk7LyWDAUUnatc1GogQ9uTwGceh3U42ZzCR4pa+7woAfgLvBT4lmVZ QKrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si8125940edq.338.2021.03.09.03.25.34; Tue, 09 Mar 2021 03:25:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229837AbhCILYh (ORCPT + 99 others); Tue, 9 Mar 2021 06:24:37 -0500 Received: from mga01.intel.com ([192.55.52.88]:41542 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230140AbhCILYV (ORCPT ); Tue, 9 Mar 2021 06:24:21 -0500 IronPort-SDR: hFTJKYm9Xkk4hSVNbvEynp7Ua8I8RdB8S1TMzbVUhQw+U/hmeDZl7Ivvn/bNLVHTJo/2otmavQ MM8AtFeFqa2A== X-IronPort-AV: E=McAfee;i="6000,8403,9917"; a="207987897" X-IronPort-AV: E=Sophos;i="5.81,234,1610438400"; d="scan'208";a="207987897" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2021 03:24:19 -0800 IronPort-SDR: Qii+MoWk4dOYJ10fx/+shoz9QfhvckuFZ1K8RLfi9MCjTYCS+0QTXmCk1xvbf8s27O/NU9xiZ4 yv6y1Ql11q0w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,234,1610438400"; d="scan'208";a="599289384" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 09 Mar 2021 03:24:17 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 72742147; Tue, 9 Mar 2021 13:24:18 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Rodolfo Giometti , Ryan Govostes , Greg Kroah-Hartman Subject: [PATCH resend v1 2/7] pps: clients: gpio: Use dev_err_probe() to avoid log noise Date: Tue, 9 Mar 2021 13:23:58 +0200 Message-Id: <20210309112403.36633-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210309112403.36633-1-andriy.shevchenko@linux.intel.com> References: <20210309112403.36633-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When GPIO APIs return -EPROBE_DEFER there is no need to print the message, especially taking into consideration that it may repeat several times. Use dev_err_probe() to avoid log noise in such cases. Signed-off-by: Andy Shevchenko --- drivers/pps/clients/pps-gpio.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c index f89c31aa66f1..78c9680e8063 100644 --- a/drivers/pps/clients/pps-gpio.c +++ b/drivers/pps/clients/pps-gpio.c @@ -110,19 +110,16 @@ static int pps_gpio_setup(struct platform_device *pdev) data->gpio_pin = devm_gpiod_get(&pdev->dev, NULL, /* request "gpios" */ GPIOD_IN); - if (IS_ERR(data->gpio_pin)) { - dev_err(&pdev->dev, - "failed to request PPS GPIO\n"); - return PTR_ERR(data->gpio_pin); - } + if (IS_ERR(data->gpio_pin)) + return dev_err_probe(&pdev->dev, PTR_ERR(data->gpio_pin), + "failed to request PPS GPIO\n"); data->echo_pin = devm_gpiod_get_optional(&pdev->dev, "echo", GPIOD_OUT_LOW); - if (IS_ERR(data->echo_pin)) { - dev_err(&pdev->dev, "failed to request ECHO GPIO\n"); - return PTR_ERR(data->echo_pin); - } + if (IS_ERR(data->echo_pin)) + return dev_err_probe(&pdev->dev, PTR_ERR(data->echo_pin), + "failed to request ECHO GPIO\n"); if (data->echo_pin) { ret = of_property_read_u32(np, -- 2.30.1