Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759514AbcJQWSc (ORCPT ); Mon, 17 Oct 2016 18:18:32 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:59208 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755781AbcJQWSb (ORCPT ); Mon, 17 Oct 2016 18:18:31 -0400 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens Cc: Linus Torvalds , linux-kernel@vger.kernel.org, Arnd Bergmann , Sebastian Ott , Gerald Schaefer , Joerg Roedel , Christian Borntraeger , linux-s390@vger.kernel.org Subject: [PATCH 25/28] s390: pci: don't print uninitialized data for debugging Date: Tue, 18 Oct 2016 00:16:13 +0200 Message-Id: <20161017221650.1902729-6-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161017220342.1627073-1-arnd@arndb.de> References: <20161017220342.1627073-1-arnd@arndb.de> X-Provags-ID: V03:K0:YgXoStG0OTFuspyuFgmIjf/MY+Bc22ew0AtSCTC5EhOVGvt68Zz HzzU2vu3lRvXjsnynuGuN5G0akwJmlIn4Tw/BFHfg/imbR2G41uK7vKg4aUd1v5607HHprU pVXVYfhgjN4j7fBkASzTbkBq8o2CuUP+4HwiZdo+sZt72tHb4gn6UOgUfqcIQNdfK1Axf7l 9fcIHpQIB1UJrS+JstRng== X-UI-Out-Filterresults: notjunk:1;V01:K0:kCcWYMFPsCc=:Pae7O4lwLk9zAsrEvsaBLv AS/TxyFs/W2RKWPZo6z/EDJ/Npg+Y1xRoy1OHZgJhuEOaor7nrH1izF0M3yerkQuf4l2ZsRQO TngV1aC0wPX7qO5txUPziSYS4gHsGXUiCFAJqtPp9Ir+aHp0ZPmQbhp8xWt4sMU0KGr2IMRwq oh8oBUKvxWBEsEu8zPEVymWP729rwd6pBWyBMZMQm5BiKORGWpvUGZ5zNLIpj5rdBOyZ4Amp/ ZlbZXLZW6oyFzifvhLomprNpGzU25bCcMx75qxHTmVrjtkoOCfHLlO7vH32aQq8cncceyjp1I bvJyrCGpliDdJf4kw/Kw5mpvPoyJQhFKOUbtPsB92GX4CMGemKhQGNzEmGCqdM+vzpbdUxS/Z 9xdx1+rnGov6EHrfouwhYAT6gQdw/auEvGYmYC14O2so7nbHwBHrW2iYYkli15lg2TXq9oIap YylCekDAl0MyZu8zBYhxQSpkLAgA/rht+Qhfqe0j/J5mPwvs/l2PqZhsf9qIJv13riXbk0i9R 0F4qrrIQykU0t/ER8y8EG4B+p/3Vq7kxee9YDC/+E2yAd6ig/5GnKdE+21SyF0W3/+4o5Bbnp ClKpNyT02Io0lIyx4+2XJIc3JMVAOwcOGB5bMZiy8jP9ELyHMj+hJzzmuBWybn/8Rf+ne3kiq 5RqzU+n9651HUJI8KcIcCu+PurbLyu1YQfq9x3AVx4okqJ20QZbwspJvqnSidnecazzY= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1125 Lines: 32 gcc correctly warns about an incorrect use of the 'pa' variable in case we pass an empty scatterlist to __s390_dma_map_sg: arch/s390/pci/pci_dma.c: In function '__s390_dma_map_sg': arch/s390/pci/pci_dma.c:309:13: warning: 'pa' may be used uninitialized in this function [-Wmaybe-uninitialized] This adds a bogus initialization to the function to sanitize the debug output. I would have preferred a solution without the initialization, but I only got the report from the kbuild bot after turning on the warning again, and didn't manage to reproduce it myself. Signed-off-by: Arnd Bergmann --- arch/s390/pci/pci_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/pci/pci_dma.c b/arch/s390/pci/pci_dma.c index 7350c8b..6b2f72f 100644 --- a/arch/s390/pci/pci_dma.c +++ b/arch/s390/pci/pci_dma.c @@ -423,7 +423,7 @@ static int __s390_dma_map_sg(struct device *dev, struct scatterlist *sg, dma_addr_t dma_addr_base, dma_addr; int flags = ZPCI_PTE_VALID; struct scatterlist *s; - unsigned long pa; + unsigned long pa = 0; int ret; size = PAGE_ALIGN(size); -- 2.9.0