From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752440AbdLFV0g (ORCPT ); Wed, 6 Dec 2017 16:26:36 -0500 Received: from terminus.zytor.com ([65.50.211.136]:34195 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119AbdLFV0d (ORCPT ); Wed, 6 Dec 2017 16:26:33 -0500 Date: Wed, 6 Dec 2017 13:21:48 -0800 From: tip-bot for Arnd Bergmann Message-ID: Cc: paulmck@linux.vnet.ibm.com, peterz@infradead.org, mark.rutland@arm.com, hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, vkuznets@redhat.com, torvalds@linux-foundation.org, luto@amacapital.net, mingo@kernel.org, arnd@arndb.de Reply-To: luto@amacapital.net, torvalds@linux-foundation.org, vkuznets@redhat.com, tglx@linutronix.de, arnd@arndb.de, mingo@kernel.org, paulmck@linux.vnet.ibm.com, hpa@zytor.com, linux-kernel@vger.kernel.org, peterz@infradead.org, mark.rutland@arm.com In-Reply-To: <20171204150203.852959-1-arnd@arndb.de> References: <20171204150203.852959-1-arnd@arndb.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/vdso: Change time() prototype to match __vdso_time() Git-Commit-ID: 88edb57d1e0b262e669c5cad36646dcf5a7f37f5 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: 88edb57d1e0b262e669c5cad36646dcf5a7f37f5 Gitweb: https://git.kernel.org/tip/88edb57d1e0b262e669c5cad36646dcf5a7f37f5 Author: Arnd Bergmann AuthorDate: Mon, 4 Dec 2017 16:01:55 +0100 Committer: Ingo Molnar CommitDate: Wed, 6 Dec 2017 21:31:46 +0100 x86/vdso: Change time() prototype to match __vdso_time() 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 Acked-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Mark Rutland Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Vitaly Kuznetsov Link: http://lkml.kernel.org/r/20171204150203.852959-1-arnd@arndb.de Signed-off-by: Ingo Molnar --- arch/x86/entry/vdso/vclock_gettime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/entry/vdso/vclock_gettime.c b/arch/x86/entry/vdso/vclock_gettime.c index 11b13c4..f19856d 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")));