From patchwork Mon Dec 4 15:01:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 120564 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4540659qgn; Mon, 4 Dec 2017 07:03:36 -0800 (PST) X-Google-Smtp-Source: AGs4zMb6OiV6GfatojSa3WeJ61d5HgRMBMaF45CZo9L22OLeUKvUseXPs1cO1t9Hi6OQkxetbcIb X-Received: by 10.98.14.15 with SMTP id w15mr19664820pfi.222.1512399816399; Mon, 04 Dec 2017 07:03:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512399816; cv=none; d=google.com; s=arc-20160816; b=R9pULMI7vGZ0y8/PIqzrq8tx72f2/yRDhw/D+lc6J2tpUzH0lmJWUGO6DdW7Jq0JfZ lGCfJSWoD2cvXBTpH+AKBQrznrWcWy85Rpl7jgoEeVk2CtXhPTusv96R6cgf0CJTyMW9 nroEg201EhSJtWrGsTaMSYDWp0rlCy7gn8grcaqJDE8MiNnLehUlJ/RBmA8DuWSdL9bR OKmSpeKn3qwgoTdFZhTA8lMjE3g185Wuc4MQwHZe4V7idneMk1snTy5KV/JWbYpuhaI1 vaFdnwgDsKC0cQiUf7A6WOjFgJ9DfCiQlIhzIfVD+bIAZsPG/eTk2rDpKeN9eIpFqIQG iSpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=rUnvdcLf7Up0xwyRaSb4AVbtXS2q5ux654iuLJyvtDg=; b=tWH+17KhUlu5/oe1CLvwxZe0wyNEDBRH9Pr188VxSaIJMH88AQ/m+pDDh4INxhIpav CmmjWQ7KubRL9YnQGYamqcO90g6tnODv+UmlNndCew2DXs4fP3BEn/aeNdBT8aD0TdQb WuyKOFkvncJsAMhVNjNxw4k1qjkCScblSl0pRJXIGO08XRZ9o0ErQUvBzZEX3jbevySC 3OrWbGNiL/ktle2NL7FQwsDFKXb7V+jUw2wuCj2MeFO4VPWJ3jYD7u4RvptFb/wNbmHa IJr9PRZpnHK1hd3sKfCSb66+czozbMwPoCiBhazoTZhFP7MuQ8VMYA6ckXk7b1YqcccV N4Qw== 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 a61si5073765plc.330.2017.12.04.07.03.35; Mon, 04 Dec 2017 07:03:36 -0800 (PST) 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 S1754168AbdLDPDe (ORCPT + 28 others); Mon, 4 Dec 2017 10:03:34 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:61609 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753541AbdLDPDb (ORCPT ); Mon, 4 Dec 2017 10:03:31 -0500 Received: from wuerfel.lan ([149.172.96.106]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.129]) with ESMTPA (Nemesis) id 0MbEzf-1efssj3YK3-00Kek6; Mon, 04 Dec 2017 16:02:19 +0100 From: Arnd Bergmann To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org Cc: Arnd Bergmann , Mark Rutland , "Paul E. McKenney" , Vitaly Kuznetsov , linux-kernel@vger.kernel.org Subject: [PATCH] x86: vdso: change time() prototype to match __vdso_time() Date: Mon, 4 Dec 2017 16:01:55 +0100 Message-Id: <20171204150203.852959-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:p23f1LTvIzHbzkQSZc5Ei84ZO0ijxyhg5hR4ECnXXZShF9qXDop PI0yXF8RxFxGicUI4C+FOtsHOIxWY/yvBJxgtI7SWtvKlFbuGbt7CPqfzESuO2Ln2s/hV5F l+fgFNlDaqyX5C2zIFZM6Sn1HB+S/CyI8btYGH83oVq1TmH4d3KQz+iJU2ffyGr2g9S854Q 1og6m87ja8vVfHf37DWfw== X-UI-Out-Filterresults: notjunk:1; V01:K0:g84KjQHmiu8=:/655ixs+u3hOQKMc+1V/KQ ZQMW0tsYxoeeKSxFlWYWpmmzjd8uakR+V28u5U4HG/2b1aR2K6hxUrpzDRz2hQHSfoK2eyjMQ h3EHsQHJcVCBR7qhkxWg3SZz2W+dPsweHrGevb7/blkFLdiYrqVafsZFSQsmHzonB+yXCUa0e UyJoYvTqK8pFQWVXr9ZHp3hbgrdQlR41exq0048YAALEgvZz4WzhM9AdUnXH9w0ie1vkgAhIX qHMtsP5i/IPnOmpeLW2O+kFaYTRPsuBdBg2gA1HCxGx7GupOsq0JsETPf49BQX4J4HwZPUzq1 mYhzDpQCSOc8yJi+UWNq7J+so4ewJozV+mORUVdF6ctdIKLNnXar0jn76jw+AegNp/PaxYXqq o3nYkkyCZhehdBeJ2DMIwnqV7OyQT5zEB+Wh86Nq342nSspVWVWhQqJQ+BRZAyhfJyVn24gQf 4ejJh1omMhp2PdJboCKNorAKOwSFjc4ArLOsEksbFbUfPUZA8WgVVj0DOWUF92sGi7OQjsFBf F2Y8ExOZG8rNawQaiQ8buCpUALGh3+DjVg/yGeH6aJxYrwmaUmMr3enBDLMJOk/b1OklPetS1 0pO73y4bh+P9nIXoZHJ7QoTuSbjX35j/G5cguLA2/ktB4oFizlL6LQsnG3xjR6gD4FUhfQMjf 3kU4fte/G9utD0oKLawVCozmFooyT3L5tVUfvp7EGZCA1eZSZI+q2fA5kLkeIZpVHTrRBQpfb J4Fe9aNEJ/E6WncQQmtki0XMDWAHWmV95ZFJ92hmqTV0+9KTE2EKJmJc1rY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc-8 warns that time() is an alias for __vdso_time() but the two have different prototypes: arch/x86/entry/vdso/vclock_gettime.c:327:5: error: 'time' alias between functions of incompatible types 'int(time_t *)' {aka 'int(long int *)'} and 'time_t(time_t *)' {aka 'long int(long int *)'} [-Werror=attribute-alias] int time(time_t *t) ^~~~ arch/x86/entry/vdso/vclock_gettime.c:318:16: note: aliased declaration here I could not figure out whether this is intentional, but I see that changing it to return time_t avoids the warning. Returning 'int' from time() is also a bit questionable, as it causes an overflow in y2038 even on 64-bit architectures that use a 64-bit time_t type. On 32-bit architecture with 64-bit time_t, time() should always be implement by the C library by calling a (to be added) clock_gettime() variant that takes a sufficiently wide argument. Signed-off-by: Arnd Bergmann --- arch/x86/entry/vdso/vclock_gettime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index b179d73c53bf..ebd1ab0b21a2 100644 --- a/arch/x86/entry/vdso/vclock_gettime.c +++ b/arch/x86/entry/vdso/vclock_gettime.c @@ -324,5 +324,5 @@ notrace time_t __vdso_time(time_t *t) *t = result; return result; } -int time(time_t *t) +time_t time(time_t *t) __attribute__((weak, alias("__vdso_time")));