lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200814141355.3816-1-h.assmann@pengutronix.de>
Date:   Fri, 14 Aug 2020 16:13:55 +0200
From:   Holger Assmann <h.assmann@...gutronix.de>
To:     Pierre-Yves MORDRET <pierre-yves.mordret@...com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...com>,
        Wolfram Sang <wsa@...nel.org>,
        Alain Volmat <alain.volmat@...com>,
        Etienne Carriere <etienne.carriere@...com>
Cc:     kernel@...gutronix.de, Holger Assmann <h.assmann@...gutronix.de>,
        linux-i2c@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] i2c: stm32: remove unnecessary DMA kernel error log

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 <h.assmann@...gutronix.de>
---
 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;
 	}
 
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ