From patchwork Mon Jan 25 16:53:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101099 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1471601lbb; Mon, 25 Jan 2016 08:55:07 -0800 (PST) X-Received: by 10.66.234.8 with SMTP id ua8mr27331354pac.45.1453740907530; Mon, 25 Jan 2016 08:55:07 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 66si34711081pfq.45.2016.01.25.08.55.07; Mon, 25 Jan 2016 08:55:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933697AbcAYQzA (ORCPT + 30 others); Mon, 25 Jan 2016 11:55:00 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:63931 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932767AbcAYQy4 (ORCPT ); Mon, 25 Jan 2016 11:54:56 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0M1kWE-1a7sHX3fgI-00thP1; Mon, 25 Jan 2016 17:54:14 +0100 From: Arnd Bergmann To: Herbert Xu Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-crypto@vger.kernel.org, "David S. Miller" , Chen-Yu Tsai , LABBE Corentin , Maxime Ripard , linux-kernel@vger.kernel.org Subject: [PATCH 1/4] crypto: sunxi - don't print uninitialized data Date: Mon, 25 Jan 2016 17:53:48 +0100 Message-Id: <1453740845-1980433-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:pXWGXZgXcvdfCSiZDHx30QnrwVYIYexBEyBDSxMjVnVhuos+M+j pLAPVaMfZb+hznxuB4XfgNZIYg4yvcXj3bEp5C5BjTx+eSKCS2m/ZGdtLubCbIZRUX/7J8o bCYQAtfUuM8gaK3IEB+wCYMNQ9BsLnCNTrTtTM6yzfcloEzsBqHk66xam1qaq55+7EuvYME 8+Feq9aouCeBA3+zFTfiQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:ahejDtiO6IA=:Ra534Sqc6VfXRPce/Nw02S 0NIwZR6nZpF016WITGF3exnwXJ+fgv4flCQ38mGLpbFcFja9ttvQZy0Aqpj6U92JSbRllVi1P XJA3ecnb8drAqM1wdmEy/ZkJVVzFX43+qy95hJogSWdZ0fej7x3p3GXlOuFX3aHmvwc54gUuC k3/+3lWQViz0AwoxjijtEw0xwecfZyx6GEzp9f/8GqoeSgg+uFs8ubZQzwsPW56Otz+uZhHzq YalGOiEGjXRS8IggH5LfAve5CQLx1RF//egCcPhZaBbwcOQ6/hNKGJZQD9TqTj0vB1rjzg5Qr HIAJtt1pfzYEnCIpEbSwrsLceKQvkZk3u5cWzbj41+fuM//xfIEFlCFwksQtTt38zwSzmG2L1 FGQsuw8Pe0BIdwKa/4MTUWO2HlFG1+rdIbjTeIcNvCOyqc02+1xS7yjv6+uD1aWPetmY/Vskn YZ32j8NCBU/Wv0ZNzMmc57LGxl/lwuP5kN1kF1vzqjBG9KkG6RElVzGu6DY/pK61U5jo3DjE/ QAO/beaLedvjj9MzzeMQnfWiw5E37EPOnK6HOdn5q1zhmphHUusXd2vP4r/vU2E6LpUgFLZ/Q no2RxplhSXfTPbhNYxTOwPZ4isF60vO7B53oHzLvYV54/1iUW036sXo3IfTLrv862iWnOM+Ik 7K05Ad6KAHKsUwbCwodZYTZ7Mns8cl/fDFosjHNsp458JlJ5goXcw85AsJXDw/hIH7SQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc correctly warns that the printk output contains a variable that is not initialized in some cases: drivers/crypto/sunxi-ss/sun4i-ss-cipher.c: In function 'sun4i_ss_cipher_poll': drivers/crypto/sunxi-ss/sun4i-ss-cipher.c:254:76: warning: 'todo' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/crypto/sunxi-ss/sun4i-ss-cipher.c:144:15: note: 'todo' was declared here This adds an explicit initialization to zero in the exact case where it was missing, to avoid leaking stack data to the console and to shut up that warning. Signed-off-by: Arnd Bergmann --- drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.0 diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c index a19ee127edca..db52ae16c147 100644 --- a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c @@ -246,6 +246,8 @@ static int sun4i_ss_cipher_poll(struct ablkcipher_request *areq) sg_miter_next(&mi); oi = 0; } + } else { + todo = 0; } spaces = readl(ss->base + SS_FCSR);