From patchwork Wed Apr 21 16:31:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12216503 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DECC2C433B4 for ; Wed, 21 Apr 2021 16:32:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 80E7B6140F for ; Wed, 21 Apr 2021 16:32:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80E7B6140F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A07B26E9D2; Wed, 21 Apr 2021 16:31:59 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id F2C606E9BD for ; Wed, 21 Apr 2021 16:31:56 +0000 (UTC) IronPort-SDR: Zd78nyeFt7sdRixKwRpAtoCBcqkOezhLD8RChjC2/oXRG2usieY4x0gr07ccHYJ6g3Ai+JOSfa pkeDFnR4Kugw== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="195755661" X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="195755661" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2021 09:31:54 -0700 IronPort-SDR: egJVzti0po9XsNmWI6Ek9lQZfrx+P59DVCjFK8P3PktHZQFjGBvqZbki3SoWSOAlG+GXxyUhlJ aJC/kvrmCObg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="423606001" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 21 Apr 2021 09:31:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B353516A; Wed, 21 Apr 2021 19:32:09 +0300 (EEST) From: Andy Shevchenko To: Sam Ravnborg , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/7] drm/st7735r: Avoid spamming logs if probe is deferred Date: Wed, 21 Apr 2021 19:31:51 +0300 Message-Id: <20210421163157.50949-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Shevchenko , David Lechner , David Airlie , Kamlesh Gurudasani Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/tiny/st7735r.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/tiny/st7735r.c b/drivers/gpu/drm/tiny/st7735r.c index faaba0a033ea..e3cbaa846e2b 100644 --- a/drivers/gpu/drm/tiny/st7735r.c +++ b/drivers/gpu/drm/tiny/st7735r.c @@ -207,16 +207,12 @@ static int st7735r_probe(struct spi_device *spi) drm = &dbidev->drm; dbi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(dbi->reset)) { - DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n"); - return PTR_ERR(dbi->reset); - } + if (IS_ERR(dbi->reset)) + return dev_err_probe(dev, PTR_ERR(dbi->reset), "Failed to get GPIO 'reset'\n"); dc = devm_gpiod_get(dev, "dc", GPIOD_OUT_LOW); - if (IS_ERR(dc)) { - DRM_DEV_ERROR(dev, "Failed to get gpio 'dc'\n"); - return PTR_ERR(dc); - } + if (IS_ERR(dc)) + return dev_err_probe(dev, PTR_ERR(dc), "Failed to get GPIO 'dc'\n"); dbidev->backlight = devm_of_find_backlight(dev); if (IS_ERR(dbidev->backlight)) From patchwork Wed Apr 21 16:31:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12216507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04068C433ED for ; Wed, 21 Apr 2021 16:32:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9FC2961439 for ; Wed, 21 Apr 2021 16:32:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FC2961439 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BE13D6E9D3; Wed, 21 Apr 2021 16:32:10 +0000 (UTC) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 848966E9D3 for ; Wed, 21 Apr 2021 16:32:09 +0000 (UTC) IronPort-SDR: Aw630LwgaF+UB9sAMv7axjfFhJqJ2V39ZQPB0ubAtruCppOb/USFkAj+5n4WN/+S96dRl8LjJU HiqdHBaHhWQA== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="257043076" X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="257043076" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2021 09:31:54 -0700 IronPort-SDR: /KdGZlOfqIx0fIq/OJyt4dPj5qBRzQbE521tpZrgJ9jd9wamzmqs056dGqJvaC83NbitTUXziA q3+RaAsr1KTg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="445985932" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 21 Apr 2021 09:31:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id BC8DE13C; Wed, 21 Apr 2021 19:32:09 +0300 (EEST) From: Andy Shevchenko To: Sam Ravnborg , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/7] drm/st7586: Avoid spamming logs if probe is deferred Date: Wed, 21 Apr 2021 19:31:52 +0300 Message-Id: <20210421163157.50949-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210421163157.50949-1-andriy.shevchenko@linux.intel.com> References: <20210421163157.50949-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Shevchenko , David Lechner , David Airlie , Kamlesh Gurudasani Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/tiny/st7586.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/tiny/st7586.c b/drivers/gpu/drm/tiny/st7586.c index ff5cf60f4bd7..fdd823e6ed44 100644 --- a/drivers/gpu/drm/tiny/st7586.c +++ b/drivers/gpu/drm/tiny/st7586.c @@ -323,16 +323,12 @@ static int st7586_probe(struct spi_device *spi) bufsize = (st7586_mode.vdisplay + 2) / 3 * st7586_mode.hdisplay; dbi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(dbi->reset)) { - DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n"); - return PTR_ERR(dbi->reset); - } + if (IS_ERR(dbi->reset)) + return dev_err_probe(dev, PTR_ERR(dbi->reset), "Failed to get GPIO 'reset'\n"); a0 = devm_gpiod_get(dev, "a0", GPIOD_OUT_LOW); - if (IS_ERR(a0)) { - DRM_DEV_ERROR(dev, "Failed to get gpio 'a0'\n"); - return PTR_ERR(a0); - } + if (IS_ERR(a0)) + return dev_err_probe(dev, PTR_ERR(a0), "Failed to get GPIO 'a0'\n"); device_property_read_u32(dev, "rotation", &rotation); From patchwork Wed Apr 21 16:31:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12216509 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A6D2C43461 for ; Wed, 21 Apr 2021 16:32:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2873E6144E for ; Wed, 21 Apr 2021 16:32:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2873E6144E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6B8426E9D5; Wed, 21 Apr 2021 16:32:13 +0000 (UTC) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3864D6E9D3 for ; Wed, 21 Apr 2021 16:32:10 +0000 (UTC) IronPort-SDR: AbQENlU89NnOi4E0H8Wqa6a/Z//XTLZdyGHbLXDVs14k7mxKYHhlQwUztLG3BTGgR64k3cFYTG SRyLjFxmWJqw== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="257043083" X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="257043083" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2021 09:31:55 -0700 IronPort-SDR: GOya5ek2+uiIv+P8uzWsNJ+SGq06mCM2Tix19vsMpSPyVUs0m7DsuZ+IWBVK4Pq4ilL+y3G5hg kUHzpIsuSZsw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="445985933" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 21 Apr 2021 09:31:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id C64E61C8; Wed, 21 Apr 2021 19:32:09 +0300 (EEST) From: Andy Shevchenko To: Sam Ravnborg , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 3/7] drm/mi0283qt: Avoid spamming logs if probe is deferred Date: Wed, 21 Apr 2021 19:31:53 +0300 Message-Id: <20210421163157.50949-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210421163157.50949-1-andriy.shevchenko@linux.intel.com> References: <20210421163157.50949-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Shevchenko , David Lechner , David Airlie , Kamlesh Gurudasani Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/tiny/mi0283qt.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/tiny/mi0283qt.c b/drivers/gpu/drm/tiny/mi0283qt.c index ff77f983f803..c90b5dee7761 100644 --- a/drivers/gpu/drm/tiny/mi0283qt.c +++ b/drivers/gpu/drm/tiny/mi0283qt.c @@ -196,16 +196,12 @@ static int mi0283qt_probe(struct spi_device *spi) drm = &dbidev->drm; dbi->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(dbi->reset)) { - DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n"); - return PTR_ERR(dbi->reset); - } + if (IS_ERR(dbi->reset)) + return dev_err_probe(dev, PTR_ERR(dbi->reset), "Failed to get GPIO 'reset'\n"); dc = devm_gpiod_get_optional(dev, "dc", GPIOD_OUT_LOW); - if (IS_ERR(dc)) { - DRM_DEV_ERROR(dev, "Failed to get gpio 'dc'\n"); - return PTR_ERR(dc); - } + if (IS_ERR(dc)) + return dev_err_probe(dev, PTR_ERR(dc), "Failed to get GPIO 'dc'\n"); dbidev->regulator = devm_regulator_get(dev, "power"); if (IS_ERR(dbidev->regulator)) From patchwork Wed Apr 21 16:31:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12216501 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AB0AC433B4 for ; Wed, 21 Apr 2021 16:32:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C11906140F for ; Wed, 21 Apr 2021 16:32:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C11906140F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 65DD26E9D1; Wed, 21 Apr 2021 16:31:58 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4D43D6E9BD for ; Wed, 21 Apr 2021 16:31:57 +0000 (UTC) IronPort-SDR: 2U5NDOna2GXzEXFcR6fXdJhtjLXi7xihD+yJK5J68AUYWirrA8jVmAK3/1L4tJgv0oFA8W5wDI V6QOTUVHu2lA== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="195755665" X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="195755665" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2021 09:31:55 -0700 IronPort-SDR: SW/MX5tiLWdk3DY1dXqevEm3+fN3N/PmJZJYDLYM2dgrIq3/vVq4KoWzMR5puCefRbWJvUzv3W KhJovEQSwa9A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="385825523" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 21 Apr 2021 09:31:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id D02361FC; Wed, 21 Apr 2021 19:32:09 +0300 (EEST) From: Andy Shevchenko To: Sam Ravnborg , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 4/7] drm/ili9486: Avoid spamming logs if probe is deferred Date: Wed, 21 Apr 2021 19:31:54 +0300 Message-Id: <20210421163157.50949-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210421163157.50949-1-andriy.shevchenko@linux.intel.com> References: <20210421163157.50949-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Shevchenko , David Lechner , David Airlie , Kamlesh Gurudasani Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/tiny/ili9486.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/tiny/ili9486.c b/drivers/gpu/drm/tiny/ili9486.c index d7ce40eb166a..8d8dd6347b09 100644 --- a/drivers/gpu/drm/tiny/ili9486.c +++ b/drivers/gpu/drm/tiny/ili9486.c @@ -206,16 +206,12 @@ static int ili9486_probe(struct spi_device *spi) drm = &dbidev->drm; dbi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(dbi->reset)) { - DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n"); - return PTR_ERR(dbi->reset); - } + if (IS_ERR(dbi->reset)) + return dev_err_probe(dev, PTR_ERR(dbi->reset), "Failed to get GPIO 'reset'\n"); dc = devm_gpiod_get(dev, "dc", GPIOD_OUT_LOW); - if (IS_ERR(dc)) { - DRM_DEV_ERROR(dev, "Failed to get gpio 'dc'\n"); - return PTR_ERR(dc); - } + if (IS_ERR(dc)) + return dev_err_probe(dev, PTR_ERR(dc), "Failed to get GPIO 'dc'\n"); dbidev->backlight = devm_of_find_backlight(dev); if (IS_ERR(dbidev->backlight)) From patchwork Wed Apr 21 16:31:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12216499 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7985C433B4 for ; Wed, 21 Apr 2021 16:32:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 330916141C for ; Wed, 21 Apr 2021 16:32:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 330916141C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 22A086E9BD; Wed, 21 Apr 2021 16:31:58 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0F6E86E9BD for ; Wed, 21 Apr 2021 16:31:56 +0000 (UTC) IronPort-SDR: BrL0gg1cKeKwCditg3QJT+FcH41OlOsLEH7C+rvegIUMV8jzKfAinYBvuhAkO/T/3KGNWQ05qs 7seR/n0rskzw== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="259683501" X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="259683501" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2021 09:31:54 -0700 IronPort-SDR: 8mpqoR++U7NCLnyr7TzI1hrvs2Rj7+13yqelMiFT+BmC7iRJSjAHsuejlobgDp5CyJxDspxvai sMfA0y92/dEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="602943662" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 21 Apr 2021 09:31:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id DA2E3272; Wed, 21 Apr 2021 19:32:09 +0300 (EEST) From: Andy Shevchenko To: Sam Ravnborg , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 5/7] drm/ili9341: Avoid spamming logs if probe is deferred Date: Wed, 21 Apr 2021 19:31:55 +0300 Message-Id: <20210421163157.50949-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210421163157.50949-1-andriy.shevchenko@linux.intel.com> References: <20210421163157.50949-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Shevchenko , David Lechner , David Airlie , Kamlesh Gurudasani Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/tiny/ili9341.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/tiny/ili9341.c b/drivers/gpu/drm/tiny/ili9341.c index 6ce97f0698eb..43418b0f8be3 100644 --- a/drivers/gpu/drm/tiny/ili9341.c +++ b/drivers/gpu/drm/tiny/ili9341.c @@ -192,16 +192,12 @@ static int ili9341_probe(struct spi_device *spi) drm = &dbidev->drm; dbi->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(dbi->reset)) { - DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n"); - return PTR_ERR(dbi->reset); - } + if (IS_ERR(dbi->reset)) + return dev_err_probe(dev, PTR_ERR(dbi->reset), "Failed to get GPIO 'reset'\n"); dc = devm_gpiod_get_optional(dev, "dc", GPIOD_OUT_LOW); - if (IS_ERR(dc)) { - DRM_DEV_ERROR(dev, "Failed to get gpio 'dc'\n"); - return PTR_ERR(dc); - } + if (IS_ERR(dc)) + return dev_err_probe(dev, PTR_ERR(dc), "Failed to get GPIO 'dc'\n"); dbidev->backlight = devm_of_find_backlight(dev); if (IS_ERR(dbidev->backlight)) From patchwork Wed Apr 21 16:31:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12216505 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19B31C433B4 for ; Wed, 21 Apr 2021 16:32:09 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1DE36144A for ; Wed, 21 Apr 2021 16:32:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1DE36144A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 065846E9BC; Wed, 21 Apr 2021 16:32:05 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7825E6E9D2 for ; Wed, 21 Apr 2021 16:31:58 +0000 (UTC) IronPort-SDR: fkS/+04QrIJPeln8HsNlJdOkQKd4fRypGMxsC/2OWtxrfw3TRadaiMn7UrB0Gxr+N/YY7kxroO SkZKEv+ieDkQ== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="193609070" X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="193609070" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2021 09:31:58 -0700 IronPort-SDR: +awME68o3LU6XESKpXUuI+gGA1VHq6tI9n/JGQahZplVcquFGyEcKCeNGVBpAxEkd6Q3sas8WK Dym5vSbBRkGg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="455406202" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 21 Apr 2021 09:31:55 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id E43F42B8; Wed, 21 Apr 2021 19:32:09 +0300 (EEST) From: Andy Shevchenko To: Sam Ravnborg , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 6/7] drm/ili9225: Avoid spamming logs if probe is deferred Date: Wed, 21 Apr 2021 19:31:56 +0300 Message-Id: <20210421163157.50949-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210421163157.50949-1-andriy.shevchenko@linux.intel.com> References: <20210421163157.50949-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Shevchenko , David Lechner , David Airlie , Kamlesh Gurudasani Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/tiny/ili9225.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/tiny/ili9225.c b/drivers/gpu/drm/tiny/ili9225.c index 8e98962db5a2..db89cced67df 100644 --- a/drivers/gpu/drm/tiny/ili9225.c +++ b/drivers/gpu/drm/tiny/ili9225.c @@ -379,16 +379,12 @@ static int ili9225_probe(struct spi_device *spi) drm = &dbidev->drm; dbi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); - if (IS_ERR(dbi->reset)) { - DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n"); - return PTR_ERR(dbi->reset); - } + if (IS_ERR(dbi->reset)) + return dev_err_probe(dev, PTR_ERR(dbi->reset), "Failed to get GPIO 'reset'\n"); rs = devm_gpiod_get(dev, "rs", GPIOD_OUT_LOW); - if (IS_ERR(rs)) { - DRM_DEV_ERROR(dev, "Failed to get gpio 'rs'\n"); - return PTR_ERR(rs); - } + if (IS_ERR(rs)) + return dev_err_probe(dev, PTR_ERR(rs), "Failed to get GPIO 'rs'\n"); device_property_read_u32(dev, "rotation", &rotation); From patchwork Wed Apr 21 16:31:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12216513 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43D6EC433ED for ; Wed, 21 Apr 2021 16:32:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2D136144A for ; Wed, 21 Apr 2021 16:32:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2D136144A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 21A1A6E9D9; Wed, 21 Apr 2021 16:32:44 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id DF5DA6E9D9 for ; Wed, 21 Apr 2021 16:32:42 +0000 (UTC) IronPort-SDR: GxpRvPMtzJRQFXL/lvjEotkwPqAi9MFOWAY4Cj6O2i5s/fOw+EB94ZeW5UGKQ0nD1PN1fYDFwL Jpj8KWCbWZeA== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="183217508" X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="183217508" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2021 09:31:58 -0700 IronPort-SDR: jpgftBOnqMnzl6J2OJMKjJRdDuwaPEF4yuBKoJ/NElHat8bwOm3Ld3YSQlnVt2EYbM46teIylK x3iPDehF0gDA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,240,1613462400"; d="scan'208";a="384500741" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 21 Apr 2021 09:31:55 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id EFAE42EF; Wed, 21 Apr 2021 19:32:09 +0300 (EEST) From: Andy Shevchenko To: Sam Ravnborg , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 7/7] drm/hx8357d: Avoid spamming logs if probe is deferred Date: Wed, 21 Apr 2021 19:31:57 +0300 Message-Id: <20210421163157.50949-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210421163157.50949-1-andriy.shevchenko@linux.intel.com> References: <20210421163157.50949-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Shevchenko , David Lechner , David Airlie , Kamlesh Gurudasani Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The GPIO request can fail and probe may be deferred. Thus, the error message may be printed again and again. Avoid this by replacing DRM_DEV_ERROR() by dev_err_probe(). Signed-off-by: Andy Shevchenko --- drivers/gpu/drm/tiny/hx8357d.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tiny/hx8357d.c b/drivers/gpu/drm/tiny/hx8357d.c index c6525cd02bc2..17b2a3cb4918 100644 --- a/drivers/gpu/drm/tiny/hx8357d.c +++ b/drivers/gpu/drm/tiny/hx8357d.c @@ -234,10 +234,8 @@ static int hx8357d_probe(struct spi_device *spi) drm = &dbidev->drm; dc = devm_gpiod_get(dev, "dc", GPIOD_OUT_LOW); - if (IS_ERR(dc)) { - DRM_DEV_ERROR(dev, "Failed to get gpio 'dc'\n"); - return PTR_ERR(dc); - } + if (IS_ERR(dc)) + return dev_err_probe(dev, PTR_ERR(dc), "Failed to get GPIO 'dc'\n"); dbidev->backlight = devm_of_find_backlight(dev); if (IS_ERR(dbidev->backlight))