From patchwork Fri Aug 14 14:13:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Holger Assmann X-Patchwork-Id: 11714655 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4C82722 for ; Fri, 14 Aug 2020 14:18:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 9CC1A206B2 for ; Fri, 14 Aug 2020 14:18:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cPAdAePr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9CC1A206B2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=4aO5qd4C1IgCLmqnOaFztVFf7f0EYOF41qY9xvQJ2W8=; b=cPAdAePrNf7XYHwcIg22Ffr6hC krtseJ3Bl6yM4+ew3pviwOS0EHWlMeWy65AKWbu4m8XKcKDcDAsPmNysMS9qO6rKYxlKCeqPmZeXd //sk6/yjsJhJG6S3aoLOl9XNbBO4tpnA5OHrlE09cAwSe2C/nm4z/yS7fFkGZ8ulxnZ8d/qkljYfO 2StE69svFvxll+BvuqXLKnAi74xQYm2NR+NhJErOa6coCizOdY2T4LklSmertcnr5jkNJhQn86NRl oB/kzCxKrfcarW21jyKzCWxXJvpcuLE5yG2wPy1VnwopU/VyhhrsZ3iYeCKxgLht0SN5zWT7kdoiZ wsKaME1g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6aXE-00076P-1F; Fri, 14 Aug 2020 14:18:20 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6aXC-000762-7H for linux-arm-kernel@lists.infradead.org; Fri, 14 Aug 2020 14:18:18 +0000 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6aX6-0000CU-Ft; Fri, 14 Aug 2020 16:18:12 +0200 Received: from has by dude02.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1k6aX4-0005WZ-5U; Fri, 14 Aug 2020 16:18:10 +0200 From: Holger Assmann To: Pierre-Yves MORDRET , Maxime Coquelin , Alexandre Torgue , Wolfram Sang , Alain Volmat , Etienne Carriere Subject: [PATCH] i2c: stm32: remove unnecessary DMA kernel error log Date: Fri, 14 Aug 2020 16:13:55 +0200 Message-Id: <20200814141355.3816-1-h.assmann@pengutronix.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: has@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200814_101818_310116_8CEAFDE5 X-CRM114-Status: GOOD ( 15.43 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, kernel@pengutronix.de, Holger Assmann , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org We currently print errors twice when there is an actual error when requesting a DMA channel, once in stm32f7_i2c_probe() when stm32_i2c_dma_request() fails and once more in stm32_i2c_dma_request() itself. stm32_i2c_dma_request() is only called from stm32f7_i2c_probe(), so we could drop the duplicate error message. This has the effect that we no longer warn about absence of a DMA channel. This is intended as it is not mandatory for the i2c-stm32 devices to have DMA enabled. Also, the overall number of DMA channels on the STM32 is limited and has to be shared with other peripherals. This may lead to DMA being intentionally off for specific devices. This patch removes the unnecessary error message. Fixes: e07a89775c71 ("i2c: stm32: don't print an error on probe deferral") Signed-off-by: Holger Assmann --- drivers/i2c/busses/i2c-stm32.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-stm32.c b/drivers/i2c/busses/i2c-stm32.c index 3f69a3bb6119..cc05a4202559 100644 --- a/drivers/i2c/busses/i2c-stm32.c +++ b/drivers/i2c/busses/i2c-stm32.c @@ -26,8 +26,6 @@ struct stm32_i2c_dma *stm32_i2c_dma_request(struct device *dev, dma->chan_tx = dma_request_chan(dev, "tx"); if (IS_ERR(dma->chan_tx)) { ret = PTR_ERR(dma->chan_tx); - if (ret != -EPROBE_DEFER) - dev_err(dev, "can't request DMA tx channel\n"); goto fail_al; } @@ -46,9 +44,6 @@ struct stm32_i2c_dma *stm32_i2c_dma_request(struct device *dev, dma->chan_rx = dma_request_chan(dev, "rx"); if (IS_ERR(dma->chan_rx)) { ret = PTR_ERR(dma->chan_rx); - if (ret != -EPROBE_DEFER) - dev_err(dev, "can't request DMA rx channel\n"); - goto fail_tx; }