Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2890480iob; Mon, 16 May 2022 08:22:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHUXxSc0TdXIITPl+A4avBUNXDl+tsK5UITKP+KVWYXaoCjCtt6KRbygZFAlUiGRzqiBTv X-Received: by 2002:a05:6402:40cf:b0:427:cead:dca with SMTP id z15-20020a05640240cf00b00427cead0dcamr13950247edb.380.1652714530017; Mon, 16 May 2022 08:22:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652714530; cv=none; d=google.com; s=arc-20160816; b=yeICjNy+LuKDgcAaUi5iw7hvQl6uIAgQAArtmQszqpjgga0tmqiw0g5C50cX7p+YZ/ NMVWQcFWeT4or5HquSFdYvwM26RkOvFDlvb6xZlwQwe+upfESZFprDZfEKc0uyOG0mcy beSLk2W9E3H1iQG4ezatrrOIMNkzbt8r1RNI4rVsBaydC37mgqDggxKdehuYk6QoANMx 59RTiqJC+51/5J9ALmPo34/xJT49BozsscSCb0xALvUeTgD5vjNWwnsFhw+HE4r0k8SH KBF/k6fQwbEfgRhoje/k9BdtaxaZGpTpgc4t1btIHBHGAtt37phXbt+ugE1sW997nNoV 3B5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oY3xwQ9fW+FpOr1qefMOopwirGc0QIZCFjAQllyTqH8=; b=ERwsuT+ydTvZDRUMlosDbb/LBMUZkJpMQ5ZoEeUerGtGjgQPwFdD6hGtzUMdMsEYu1 JREfrawgAbrEHV79VncQCiu3wp21xtgFl2R8uf2gEvZhYxJXAudFx7JY029Am+nH77Gp Vjp94IhvWINoJj4tEIk8wQZcaSmCveOybFWuii6GcbNUg8sfOtmDInvVr2hPYQPTh08F BpqYWW5lCFv797meiUx9bpxt+jdH25VOCpBxrIT0gvmZWJZk8Y4yv9uG2yd2M98D9AX3 R+5Nuf8ZMBrKvRFEi1ZDQPmq6WSsf1ojAuVrU8LZXr9zB93Qt20T0WgjrB7HNoOaHVTp 1Q5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ebIcyrPZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x14-20020aa7d6ce000000b0042ab3a8f0afsi2675385edr.238.2022.05.16.08.21.43; Mon, 16 May 2022 08:22:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ebIcyrPZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbiENVFZ (ORCPT + 99 others); Sat, 14 May 2022 17:05:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229557AbiENVFW (ORCPT ); Sat, 14 May 2022 17:05:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BEEAF63; Sat, 14 May 2022 14:05:21 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 2254860B34; Sat, 14 May 2022 21:05:21 +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 Cc: Codrin Ciubotariu , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Michael Walle , Nick Desaulniers , Tom Rix , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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