From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83ECAC433F5 for ; Thu, 5 May 2022 15:39:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MgkX6Ymp5Z9aWK9WOXmKBN36f/ouX2jhst2qdbONjFU=; b=JfhVfVYdPlVfZbNPQMlRtyaMhR GGyX3/9PjrgLjT+g1rGkrlq4HPLhy3n6cyWN7jhmh/dg3wAp8rD4qroMz5JnYX+LU1bHJjKVpIddo 02kZp41WBAy8FUP1pLzua57r8NmcucfrjVk7aPbySUKe/MRWVMOkTzpFcsZs8SuliUbcH0jtSwTL3 iw3VOX8lFfCLUg1XRP8Eab7nE4ByUDd/NUWwHw/QRcHUC/UY/Z2W34n7vh5eUAENbPWoEkHMXJWRc WCdR5QmP/41RtMVmtx6lrsW1wblsiABS2+glIakzs9JK9YQqF6T2UI62wlqMi97W8oBw+jWtf8bY6 +Arve4fg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmdYc-00GgSZ-Tm; Thu, 05 May 2022 15:38:23 +0000 Received: from ssl.serverraum.org ([2a01:4f8:151:8464::1:2]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmdYX-00GgRJ-0C for linux-arm-kernel@lists.infradead.org; Thu, 05 May 2022 15:38:18 +0000 Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id D71A022205; Thu, 5 May 2022 17:38:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1651765095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pXolXFD/8YvBpURyLprQMd66AYD3SbrwCVNfcxqyXZk=; b=WTVjWTjBe9fipZn5j8DnckvD149tei47OB9AfFABgbqxXilmu+1KhmVirxdz20oZJhFufL LHrTCTnGrpgZSV0wgPW6MOgicicmQeEwwwFwA0MS4ZY5wSQNHYmxnsWeU5d6Oev5/RXsJi GGDHzyei9ewg+WTy85lGYpT+9ZdgNvA= MIME-Version: 1.0 Date: Thu, 05 May 2022 17:38:14 +0200 From: Michael Walle To: Nathan Chancellor Subject: Re: [PATCH] i2c: at91: Initialize dma_buf in at91_twi_xfer() In-Reply-To: <20220505152738.1440249-1-nathan@kernel.org> References: <20220505152738.1440249-1-nathan@kernel.org> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <9ffec526be965d37579b573f1a0debb6@walle.cc> X-Sender: michael@walle.cc X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220505_083817_225654_75504F29 X-CRM114-Status: UNSURE ( 8.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Tom Rix , llvm@lists.linux.dev, Nick Desaulniers , linux-kernel@vger.kernel.org, Wolfram Sang , linux-i2c@vger.kernel.org, Codrin Ciubotariu , Claudiu Beznea , linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am 2022-05-05 17:27, schrieb Nathan Chancellor: > Clang warns: > > drivers/i2c/busses/i2c-at91-master.c:707:6: warning: variable > 'dma_buf' is used uninitialized whenever 'if' condition is false > [-Wsometimes-uninitialized] > if (dev->use_dma) { > ^~~~~~~~~~~~ > drivers/i2c/busses/i2c-at91-master.c:717:27: note: uninitialized use > occurs here > i2c_put_dma_safe_msg_buf(dma_buf, m_start, !ret); > ^~~~~~~ > > Initialize dma_buf to NULL, as i2c_put_dma_safe_msg_buf() is a no-op > when the first argument is NULL, which will work for the !dev->use_dma > case. > > Fixes: 03fbb903c8bf ("i2c: at91: use dma safe buffers") > Link: https://github.com/ClangBuiltLinux/linux/issues/1629 > Signed-off-by: Nathan Chancellor Thanks for fixing. Reviewed-by: Michael Walle -michael _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel