From patchwork Tue Jan 26 13:44:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101090 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1965963lbb; Tue, 26 Jan 2016 05:46:02 -0800 (PST) X-Received: by 10.98.75.143 with SMTP id d15mr34044264pfj.96.1453815961552; Tue, 26 Jan 2016 05:46:01 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wk6si2161755pac.91.2016.01.26.05.46.01 for ; Tue, 26 Jan 2016 05:46:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965169AbcAZNqA (ORCPT ); Tue, 26 Jan 2016 08:46:00 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:53296 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965130AbcAZNp7 (ORCPT ); Tue, 26 Jan 2016 08:45:59 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0LvcM8-1a3B1f3zbg-017YLp; Tue, 26 Jan 2016 14:45:12 +0100 From: Arnd Bergmann To: Herbert Xu Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Corentin Labbe , "David S. Miller" , Maxime Ripard , Chen-Yu Tsai , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] crypto: sunxi - don't print confusing data Date: Tue, 26 Jan 2016 14:44:50 +0100 Message-Id: <1453815902-3070323-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:l+xcr5w1lDWsIcKTLUFGrgEhxwth2zmIRRf6kE9FNI0JfcLe1B8 yFDc9+lOTdA53yvbBNTrSBCP4b+Nqom3KjX3c5w6pWYbUsfjTCBX7j4cmvMOmthZg9eua7N uX+ptJFvz9tPXd5z2lvNb5orfV8uf9znwx+yFlMqaKJogA498GvBEhcfDaeY24n9lRkvMfC x9d4CpjCIGiagB4QXP56Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:rGaxsTCM4cI=:rZEYZiCx8ka8GeiV1qxzZG VSFkG7dUnn04VNZ1kyQBDza0qESQzQ0NTGgdlooYiSDxk383pKmMQglz2cf8+cM5fFWSfTIiJ 2zYhKGd5z3CbHxCEcDruEzjgr81k3SEe1NN+WtuIWtu2re2qID3GJmHM505TTh9u58cp0j8kF ApT7DKpOt9taI9TDiIMw1G0OgTOKf1Sslf+Sy5IhMMMI0zya3NnbXO96tqct/9buCUoKJX1wG zgXqbvV9zfbPViRLmZsc5kZ/ABKpSw5t+BkTflilrSGhnVzJOsgeZiu36Lr3YjQyT+rlAG5x7 wDfJdCuAAKACEx6p1959OzAk/Z9WZ0tw3Zw5EJagqdOlnotqBjwsUDj3DeaNPVgcfc5tN6avI WVnHOViH3Lwlh/REc2LRwJY+TsYQ55TzGAwzIFYki/hcXMSIDH7XMd+jSOtWXVyYpNDcJEzSl 1RoRHtYmYTrHjg637O34Uy38J7Y+YTEzAbxizz26M9YC/d+EpUsZh8Tn7Jlx+SwDMsUCxj3Kz 8mfVE7vNfQs6HspjuBg60of67H8j7Kwx0vydcO0Srawawudw9eCPAI9T2L984+SYEZlJc0AWx wK3vZu0icQKMTzVdjNRvnlg7iOmsCA8Om2rxySS6MkUwPQ7UWGdGQ8UbXlMIJ0MQDsUWXBB24 qV9bM4YnJUnOwxk206wixdBGKKA8KtxMr2+kN75tbqed24NIXIysNyS0qEvhKX/iSh3g= Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org gcc correctly warns that the printk output contains a variable that it thinks 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 A closer look at the function reveals that the variable is always initialized at this point (ileft is guaranteed to be positive at the start), but its contents are not well-defined: Depending on some other variables, it might be either a count in words or bytes, and it could refer to either input or output. The easiest solution apparently is to remove the confusing output and let the reader figure out the state from the other variables. Signed-off-by: Arnd Bergmann --- drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c index a19ee127edca..7be3fbcd8d78 100644 --- a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c @@ -251,11 +251,10 @@ static int sun4i_ss_cipher_poll(struct ablkcipher_request *areq) spaces = readl(ss->base + SS_FCSR); rx_cnt = SS_RXFIFO_SPACES(spaces); tx_cnt = SS_TXFIFO_SPACES(spaces); - dev_dbg(ss->dev, "%x %u/%u %u/%u cnt=%u %u/%u %u/%u cnt=%u %u %u\n", + dev_dbg(ss->dev, "%x %u/%u %u/%u cnt=%u %u/%u %u/%u cnt=%u %u\n", mode, oi, mi.length, ileft, areq->nbytes, rx_cnt, - oo, mo.length, oleft, areq->nbytes, tx_cnt, - todo, ob); + oo, mo.length, oleft, areq->nbytes, tx_cnt, ob); if (tx_cnt == 0) continue;