Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp421687pxa; Fri, 14 Aug 2020 07:50:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzenPKnrwNXsveVA1zm0QxGYi+aG4mJhmoyotIp4M1hKnOlZEUBBDI4c7Efi/4OnM+ZMAEJ X-Received: by 2002:aa7:d58b:: with SMTP id r11mr2499301edq.302.1597416648522; Fri, 14 Aug 2020 07:50:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597416648; cv=none; d=google.com; s=arc-20160816; b=XAnXIG0sfhtU1/+seh4b+vLRO44dKqRDQmqwNg9Zg5Np0G/Oga28IpsS9VN34X17e0 s3mRCDsGX2TV56jrjV60jW3ZpgqVab6dtewkIuhyKYlu9JKcnl7XobwEwGkMLABZIfGX xt6KHJR2hAdWUjSyTXopD9OanPaPWs8A7dVkkh1WEEkcRiBtJOpvsNdaAveDMA6rayz3 +Px5A19pTVSfxjSRtroNcrnSAeODYUObHMVtL79SY0cIqSO49MizSzBIm6qssHRKfshY CavQgylS/U1JpYyHFpZcswKQk2Q1dDnc/Go5YkxCAt2cBE8dR1aaIQEtZxTQOlSLUHaW oR7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=CJHfD+f9k0jpwuWYNe1cJ3UsoD1t2PlsNJGzOOnkU4k=; b=deCqsNoG6IMnrz8JADWtndpYqse9XCPADx1x8drGwodp07p9GHflCGHZHoNhkf/ekr /DcDEkgUf+pMRDD+5Ws0rdpyhdB2HW6iZll6umJD3tyiCnyI1VuH8wNEGTJ320lpwdrJ 4LSWOiu4B4KeMAWFzNmteh0iSKcm9Xx9yyQ61VePbGMuVJZ1ef5OptkrSLcN7qFXobZA yyRspPw2hG1TuEA6J/dTbjtVub7r4/jjkhjTfByZxChVivIBfB+osFrClHk8axhFFU5d lPwJG8ULAQd9JVtmBCjf36cCKWYSfO91clw+NqZL26Qs7nq4eVSYIbr8QE2qnVoMeCjL K9bA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si5934770ejp.201.2020.08.14.07.50.25; Fri, 14 Aug 2020 07:50:48 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728606AbgHNOSU (ORCPT + 99 others); Fri, 14 Aug 2020 10:18:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727964AbgHNOST (ORCPT ); Fri, 14 Aug 2020 10:18:19 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6797C061384 for ; Fri, 14 Aug 2020 07:18:19 -0700 (PDT) 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 Cc: kernel@pengutronix.de, Holger Assmann , linux-i2c@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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 Content-Transfer-Encoding: 8bit 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-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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; } -- 2.20.1