Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4681852iob; Sun, 8 May 2022 21:49:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynkrFt+ATYvQsphIbOTml0WFYvrffF1rbaLc+R7qDAjcUYKDzV4kt3D4YZlIQCLFuA0JKB X-Received: by 2002:a17:902:bcc6:b0:15e:e60e:f3e8 with SMTP id o6-20020a170902bcc600b0015ee60ef3e8mr14401025pls.174.1652071771661; Sun, 08 May 2022 21:49:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652071771; cv=none; d=google.com; s=arc-20160816; b=bjs2P3MyJshb8noCDfLfKg/at8VIOo0BeLnoy6UwMB+dKjEL2GZtI3Zf7HaNF5EuaU kqIfGdMPrRvygfXRmUStUgFMC1UvMq3xAjqE/38uzr5QsXYHPYx8wO6RlDAOlWMZC08e M8p//K1GGaWe2WzwCKKw+Thnovi1CrcWP5zccJqbhs82u7PvFX3GJMKfa3vPz2jFFdL5 dr2n8c43hwd7QYTt3J9QU7A0TPV+PMcmRZp7HNpZxBXSku2q36pG7HIQI4cb2FCUd7BJ 22qdeT7AfZDrMmM4F9lqJ2Q7pdmIElPvCTVYUSGDtngBZwsN+VA0QgezOHJv3u88O0nD HJFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=pXolXFD/8YvBpURyLprQMd66AYD3SbrwCVNfcxqyXZk=; b=N4jyp9vscdusSLv8RiOdW8KHOwAUoDBZDJAp259/BE3kHV1fjJLQFmrKm+thgHaeYA FCcuplHeMyJu2zeGe8K7zQwQ8BEIBIbyIWi1a34rzk9LKqeqsXQzG1v45BwPjSaKy/RT s4nClU5o//PXyBIIn4uXLFc533xzBYpWlG03aAbl5a1+F2JyC3DI6JSB87QZE/zwEg2R uEoAl7WqdbsEL869TcrBDNFQ423qJBNtoRnM00rlSqkfBFZFJy7xt2UzGrTxuPxVCMiu NQdKjZLtmOL6DUciKfInhrpA8zVuhwv2ChFCciC3cAotPaOzP9R2PZrH6LNZtfC5cLXd YmIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=WTVjWTjB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 12-20020a170902c10c00b0015e99deb6cdsi9456881pli.135.2022.05.08.21.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 21:49:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=WTVjWTjB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 46D9E12FEDE; Sun, 8 May 2022 21:49:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358098AbiEEPl6 (ORCPT + 99 others); Thu, 5 May 2022 11:41:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238590AbiEEPl4 (ORCPT ); Thu, 5 May 2022 11:41:56 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA5802182B; Thu, 5 May 2022 08:38:16 -0700 (PDT) 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 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 05 May 2022 17:38:14 +0200 From: Michael Walle To: Nathan Chancellor Cc: Codrin Ciubotariu , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Wolfram Sang , 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() 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-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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