From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752556AbdGLNQ4 (ORCPT ); Wed, 12 Jul 2017 09:16:56 -0400 Received: from terminus.zytor.com ([65.50.211.136]:50669 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752151AbdGLNQy (ORCPT ); Wed, 12 Jul 2017 09:16:54 -0400 Date: Wed, 12 Jul 2017 06:10:19 -0700 From: tip-bot for Arnd Bergmann Message-ID: Cc: peterz@infradead.org, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, arnd@arndb.de, brgerst@gmail.com, torvalds@linux-foundation.org, kvalo@codeaurora.org, hpa@zytor.com, dvlasenk@redhat.com, luto@kernel.org, bp@alien8.de, jpoimboe@redhat.com Reply-To: torvalds@linux-foundation.org, luto@kernel.org, dvlasenk@redhat.com, bp@alien8.de, jpoimboe@redhat.com, kvalo@codeaurora.org, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, arnd@arndb.de, peterz@infradead.org, brgerst@gmail.com In-Reply-To: <20170710144425.2238584-1-arnd@arndb.de> References: <20170710144425.2238584-1-arnd@arndb.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/io: Mark target address as output in 'insb()' asm Git-Commit-ID: ea1b2ee6eacc4413b1dfba566480c90d0da4ec81 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: ea1b2ee6eacc4413b1dfba566480c90d0da4ec81 Gitweb: http://git.kernel.org/tip/ea1b2ee6eacc4413b1dfba566480c90d0da4ec81 Author: Arnd Bergmann AuthorDate: Mon, 10 Jul 2017 16:44:24 +0200 Committer: Ingo Molnar CommitDate: Wed, 12 Jul 2017 10:42:32 +0200 x86/io: Mark target address as output in 'insb()' asm The -Wmaybe-uninitialized warning triggers for one driver using the output of the 'insb' I/O helper on x86: drivers/net/wireless/wl3501_cs.c: In function ‘wl3501_mgmt_scan_confirm’: drivers/net/wireless/wl3501_cs.c:665:9: error: ‘sig.status’ is used uninitialized in this function [-Werror=uninitialized] drivers/net/wireless/wl3501_cs.c:668:12: error: ‘sig.cap_info’ may be used uninitialized in this function [-Werror=maybe-uninitialized] Apparently the assember constraints are slightly off here, as marking the 'addr' argument as a memory output seems appropriate here and gets rid of the warning. For consistency I'm also adding it as input for outsb(). Signed-off-by: Arnd Bergmann Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Kalle Valo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-wireless@vger.kernel.org Link: http://lkml.kernel.org/r/20170710144425.2238584-1-arnd@arndb.de Signed-off-by: Ingo Molnar --- arch/x86/include/asm/io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 7afb0e2..d107251 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -328,13 +328,13 @@ static inline unsigned type in##bwl##_p(int port) \ static inline void outs##bwl(int port, const void *addr, unsigned long count) \ { \ asm volatile("rep; outs" #bwl \ - : "+S"(addr), "+c"(count) : "d"(port)); \ + : "+S"(addr), "+c"(count) : "d"(port), "m" (addr));\ } \ \ static inline void ins##bwl(int port, void *addr, unsigned long count) \ { \ asm volatile("rep; ins" #bwl \ - : "+D"(addr), "+c"(count) : "d"(port)); \ + : "+D"(addr), "+c"(count), "=m" (addr) : "d"(port));\ } BUILDIO(b, b, char)