Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758195AbcJQWTq (ORCPT ); Mon, 17 Oct 2016 18:19:46 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:54551 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758108AbcJQWTf (ORCPT ); Mon, 17 Oct 2016 18:19:35 -0400 From: Arnd Bergmann To: x86@kernel.org Cc: Linus Torvalds , linux-kernel@vger.kernel.org, Arnd Bergmann , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" Subject: [PATCH 23/28] x86: mark target address as output in 'insb' asm Date: Tue, 18 Oct 2016 00:16:11 +0200 Message-Id: <20161017221650.1902729-4-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> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:Cko2xx+nncWS7Uvht6S6IV4bVC4Pwn6Gy87fpn5iPi25JaSlElq rZWVN1/53nzkkz0+UnHt55+dkvQ+0W9mtycOjy7o5qMhRXZcyv/BPHNP1RA+DQnDdw04Cwr O8DB3jIh4PiSCIC0xooROZ3kgv/Ic+ZlxVSMGHQa0LhdaIIHKqT1zHe/K49SOCyqL1aye8P v8O5OfHuFrDC5bnkyT17A== X-UI-Out-Filterresults: notjunk:1;V01:K0:k/68ytpHQt8=:clYFftJPx9kbdu/vqFI0sG s0DWrMDrA3b3S23s0RtT2hBKq68Z7zbSviirz4v6PJ1JCwbf1IpCGn6CKdOFKxJ/MCWyTusaf 5ib8jomC6wT2IzSE6p3KxPGyr1JKrY9wVmqTKIqjnVckRzo5e+mRzfEnwNMVi2fXUznbMH15Z QExIbCqNc5BLsWk19FYWKHJuO5g06vNsA7mwC15TWDwx5OdaW1vxz3lLRekgfgDvpoWfOeqCf v1NdYDpZriZplgtasWFDPDeX8b3EyLhuXykGA1OPI3uxNHgw+1vqG4ExX7svbLHkxumBe46JC T0zuyF/68e+wTpDrwu3m2xBF7i4yS8CGikU6LzSs1IUaIoI/cMVWZ9KQnjP3yMAX+fY1hpj1O 20l/w1pEiYJsSzd8U9SIwnJc7UjAydv+fJDuaIhumJ7Huq+3np593CBUrPPPtyKarocsIEUdn oI52ASxC+Va3tYR3WvnnCi+er8r/wCZuv0DnqeCPrsXIiGKecSN76KoCPyWxCiewRICfifoBX /uijMsbp9TrU42dh8vjBiE3MIROlIuFqnJcSstfvF4NUBh56wjcf2ONEI1polE9ibLdID5K9h f9VxkLCGc3qMaBtDZGE2UbfuXwCRbfERT0hBffMo5QE7TB6ZcD4OTwIbJTVE8p55f2sAhmVwh bhy11CpfVg6hTX570JZVQV6g7hts44+kEttt1TlyX999cd18R6kXFFkmJx/Gg4AB3TQtg9gy0 rF+y6ayBMNZSIk6d Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1776 Lines: 43 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(). I'm not an x86 person and gcc inline assembly mystifies me all the time, so please review this carefully and suggest a better way if this is not how it should be done. Cc: x86@kernel.org Signed-off-by: Arnd Bergmann --- 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 de25aad..287234c 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -304,13 +304,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) -- 2.9.0