From patchwork Mon Apr 8 21:26:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161953 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4172599jan; Mon, 8 Apr 2019 14:28:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuHu9g7xrkAbQ6ZZ4dAQQcQBhipdi+fidLZ94PTNusQyq0IDCGu29scNvIz+gE8131A7TQ X-Received: by 2002:a63:e653:: with SMTP id p19mr30244807pgj.284.1554758925206; Mon, 08 Apr 2019 14:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554758925; cv=none; d=google.com; s=arc-20160816; b=bWRW5ppESZ/vE7kox9W5vv+Ld2b8oMySi8EwISzAa4ACWRU/SiQI+WFDs1aX2BH2ZK KnIkv7yxg8q4e1s4MA3SgaIena9Vcf5vDidxI1E3mWdc+6L9C1BnXr9U7/JNHLsqjSWl pAUTE49FKMp/0HYvUIMFN/7BSwLGY+9BfNn0pxYxyIaWtE5n0UexL0ls5Br7yFpg6h9k Ifk4gZ7YhwUQPK5vCzYj/sjnOdGMF5NXeoMkKeiYy1/ABQ6+EZgJoApN5JN/89A+8Dbx jMtyFLWvITU658DofFW4tQBM1gT1ODnKh+tmJKe++d5AF8mFC7El/iIDu/L0TPAhvnfI bPNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZTmMfOJitLMm/Dh3Kf5njoE1i8EeS/kkpQlcMLmxpUc=; b=WQ+IKGTEOTnr3JvtS9MjoLSs4j6rpmF7rq20xA0jY7fuGftaCIXKF0plri3k9nPyy1 wMDv+WWDDP8MdoUgxmZ44p65iO93jfe5kHyvnlOzngX+F5lSfd+GCd4xCOyZ2quoJEwH ZETX17c+6f3pG7S5mOxVjUS3y/jF13JjFsfP9MpZz1nAf68zHrBSCw1vEKENe0xZTALk 9LedP/U42qTMw0xL9IcOq/4Y6WfqIbLzrU8rTjPoUHfSknBfgACOzCxcuJH/qYQ6uMNn n0wQVDGZxmCcro+KGmFptjvf4C9YIuGn5oPA/FNak/mhuqqMJNk1A9xo/xHRUlIXG13a mauQ== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5si26431883pgp.29.2019.04.08.14.28.44; Mon, 08 Apr 2019 14:28:45 -0700 (PDT) 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 S1729424AbfDHV2n (ORCPT + 31 others); Mon, 8 Apr 2019 17:28:43 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:54375 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726930AbfDHV2n (ORCPT ); Mon, 8 Apr 2019 17:28:43 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mn2Fb-1gViE70viR-00k6NX; Mon, 08 Apr 2019 23:28:36 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens , Arnd Bergmann Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/12] s390: syscall_wrapper: avoid clang warning Date: Mon, 8 Apr 2019 23:26:21 +0200 Message-Id: <20190408212648.2407234-8-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:a7z6K92Aqxd+6jYl8kxTzV0/4l7UDWHqxrRdCWm4WIz1hRaB51E JCrx4Cn3T9QAALoQ1tdC5DCiQvUN4GM4cwmos2Nsk5Ji3yi4TknMztqTJFJimP0/pWcv7Nd l0OwAiPftnJ7oNUu2azun8bJ+WRIFer3ER/Pwdv6ycmqP0dI6AXp9TU6msH8KOoI0c85bcZ wI8q/jtMMSfpDWJsDVE1g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:xiKi11OGdTE=:XRlwXMab1lwX6qPWoGlUS4 8PUxGXiRdSCedrtjZ0Fo33+KPKB9jshAx1gI2WuBFwdysBHulFDP14eOie3uM2n8HcRQrM+SE g5OyKVWNAETGbMk4EZBtm7n+LodH5/1ErIo2/s/pP+oOCZE6A+bDFE09utB0JK4mJa8khpfap jw9H2b36eEjYLTbAFcXRLmbnu35hdxq4t4Iex7ckBDPz7K4XJxXzNMEVae3LXtF6vY2f4/Z9K +E0cb9iMNlPNxJk+g+BGS8AS6YiVjhWHpB9VZKlhj0gZXmcOg1TNKT9k1z2NRBy6s2fYa5Q7q CZoiRZahqliFFfhWkOH/LK9+VhkFE0w5GVlzT2i07LERaHyTV1j2GfGLE/o4qa31HuEqb/Be1 7veeHn6Tz/B3MaOnfVZ68H9/WYTw0eVkwF+anp+qM8w2u/JPbM58bjnKoICyx95MZEnq3ggU4 LiEuPjtxPEZE4Fd0xx604XyPVKimGdIdgHT96ZhIH0kAscz7ZzYi8EYg9e70eTFMIw/0zr6qz 6uG57r98TDP0G4hTmf7s7OKEgLYzKsx+UEkQ+v0nHh7PWtuT+7cY3qpZYKK/TUY8whFanCbk0 J3/D3h2k5Uc4HkZ7eUjhSmjfSFJQQsdGRuY/qtGSdA2/D/XVxxvVJt17gB3SUbPmd+fhvJrSj QL1bFrktKha6I+I7hp4qNYxLoi5AAOR5czIfLLw3jZ073qpstw8pqpKH8BSgar4dU1Tp+LVqv 9XDxyKakz51C/FAzyZ0/xAvisAghsY7ZNvfEoQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building system calls with clang results in a warning about an alias from a global function to a static one: ../fs/namei.c:3847:1: warning: unused function '__se_sys_mkdirat' [-Wunused-function] SYSCALL_DEFINE3(mkdirat, int, dfd, const char __user *, pathname, umode_t, mode) ^ ../include/linux/syscalls.h:219:36: note: expanded from macro 'SYSCALL_DEFINE3' #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) ^ ../include/linux/syscalls.h:228:2: note: expanded from macro 'SYSCALL_DEFINEx' __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) ^ ../arch/s390/include/asm/syscall_wrapper.h:126:18: note: expanded from macro '__SYSCALL_DEFINEx' asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ ^ :31:1: note: expanded from here __se_sys_mkdirat ^ The only reference to the static __se_sys_mkdirat() here is the alias, but this only gets evaluated later. Making this function global as well avoids the warning. Signed-off-by: Arnd Bergmann --- I considered opening a bug report for llvm here, but I suspect the behavior is intentional, so I'm just fixing it here. Let me know if you disagree. --- arch/s390/include/asm/syscall_wrapper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.0 diff --git a/arch/s390/include/asm/syscall_wrapper.h b/arch/s390/include/asm/syscall_wrapper.h index 5596c5c625d2..3c3d6fe8e2f0 100644 --- a/arch/s390/include/asm/syscall_wrapper.h +++ b/arch/s390/include/asm/syscall_wrapper.h @@ -119,8 +119,8 @@ "Type aliasing is used to sanitize syscall arguments");\ asmlinkage long __s390x_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ __attribute__((alias(__stringify(__se_sys##name)))); \ - ALLOW_ERROR_INJECTION(__s390x_sys##name, ERRNO); \ - static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ + ALLOW_ERROR_INJECTION(__s390x_sys##name, ERRNO); \ + long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ static inline long __do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ __S390_SYS_STUBx(x, name, __VA_ARGS__) \ asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \