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 C5905C433F5 for ; Sat, 14 May 2022 21:06:41 +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-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lTuVOxO0qRLFx1o3ojBz9f2gO2iW3NV6cUgWJuWagsQ=; b=jyJjiRC9bVVSvW fpDIefDifLRTmD7pFmL3Qyg2g8kWEEWFGMrg5z2lSluIMjkaonEpsnUxdbS4deMAcYoQZiSf0mpAa s18unHMHr4SMhm8sQt4fjwjxG+v5zDlD0n7Rs54c5fjIL2nI/XnaY4keGNp25clXvZbzrEeCq4bPJ 1URqNbyHWHWkyIB0tv12vtl09fxO75y5QxV2n/Tnq8OrJJwqvtF/CxLLF4G79mWkTUQVRKNNSZ7fQ MX9MoMkF/CywEfGdOgl+ih54FSFi12tLjgDmsHII1lem3EqCMMH+60gwBnsUhzzD8T8P9k5QFLRmX ugBRQswx0j+q0VyB8mmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1npyx9-002HA3-FC; Sat, 14 May 2022 21:05:31 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1npyx6-002H9P-JA for linux-arm-kernel@lists.infradead.org; Sat, 14 May 2022 21:05:30 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 1A9A7CE0B59; Sat, 14 May 2022 21:05:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7481C340EE; Sat, 14 May 2022 21:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652562320; bh=H4zV3SBaznHA7Gdb4PBmPjf9JcyfMUIYCazARaIDVOg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ebIcyrPZt/TJ8NSlY+gTJpB/aNg2HmLj0D7DlaDZDF0UCrUPAN1429AIfiVA7TS0z y2AjGz+ruz2LFa4AbuOvca6cEzCCJlwMVJ9K+ugwdAQV+KgoQHGkrk1Bm56cYqTte9 AJNVPW9RHdgiVKayWFwWGZoerc6FpLLaaqWLdW1iZhj2v0ZUe7lYGxiNvyqE45gJVM 2C+WyV+52h0Hj6YFCvKe+NoSF5xtA0MT5wzD8+ElZOOkNXxNvnN8BX6C41ZSLSL5n7 F11lwFclnd0GpqwrHxHwLybo5NhxGl7Wx69ePMpX2GO+bdJWKz++75Uyh18Fn/Le9s /uRKh0N6NkqTA== Date: Sat, 14 May 2022 14:05:18 -0700 From: Nathan Chancellor To: Wolfram Sang Subject: Re: [PATCH] i2c: at91: Initialize dma_buf in at91_twi_xfer() Message-ID: References: <20220505152738.1440249-1-nathan@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220514_140528_846176_C6D26EE7 X-CRM114-Status: GOOD ( 14.18 ) 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, Michael Walle , linux-i2c@vger.kernel.org, Codrin Ciubotariu , Claudiu Beznea , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, May 14, 2022 at 03:42:08PM +0200, Wolfram Sang wrote: > On Thu, May 05, 2022 at 08:27:38AM -0700, Nathan Chancellor wrote: > > 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 > > Applied to for-next, thanks! > Thank you! Cheers, Nathan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel