From patchwork Fri Nov 8 15:33:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1191995 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-106816-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="L+UP01K4"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 478kpF4CQlz9sNT for ; Sat, 9 Nov 2019 02:34:13 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; q=dns; s=default; b=kBv yIXbbRuiQbIp8fEQprZWGGBGQGM0AMF/1IzL8ScBOaSU46TT/Ok/ab7U9FPO/+eb Qx2KXbQM4KPsID8FyiQZ6wxAYTqY+bmIzXg+AeYWwWqaNLo3UOcjXjIv9QBVZUxd A/hvOM0bD/sDgN2FXQnG0OMfIhknp5pj+MgsmLnw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=default; bh=QV+qkUXbJ 6c3e0+zbOh2SGN3f6A=; b=L+UP01K4jSP9wdDeOScETbEsqe6H0amUeQq+ebYRG 8usU11eVtGmBBVmsPiMAz+BxgOQP1Xs5Y1AbPIjL4kKx2Qlkarchjf9RXB/79Btb 7NwxFbv6eD6fI/WHid4ZQeBGqm42us2BCLsPJTswadyrCTmYA/uaVvVo8E7ZRMwD o4= Received: (qmail 63637 invoked by alias); 8 Nov 2019 15:34:07 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 63622 invoked by uid 89); 8 Nov 2019 15:34:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: mail-out.m-online.net From: Lukasz Majewski To: Joseph Myers , Paul Eggert Cc: Alistair Francis , Alistair Francis , GNU C Library , Adhemerval Zanella , Florian Weimer , Florian Weimer , Zack Weinberg , Carlos O'Donell , Lukasz Majewski Subject: [PATCH 1/2] linux: clock_settime: Remove check for nanoseconds validity Date: Fri, 8 Nov 2019 16:33:43 +0100 Message-Id: <20191108153344.10949-1-lukma@denx.de> MIME-Version: 1.0 The check if passed nanoseconds via struct __timespec64's *tp pointer is also performed in the Linux kernel. Remove it from glibc to avoid duplication. Reviewed-by: Alistair Francis --- sysdeps/unix/sysv/linux/clock_settime.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/clock_settime.c b/sysdeps/unix/sysv/linux/clock_settime.c index bda113809b..6706dbb31f 100644 --- a/sysdeps/unix/sysv/linux/clock_settime.c +++ b/sysdeps/unix/sysv/linux/clock_settime.c @@ -25,13 +25,6 @@ int __clock_settime64 (clockid_t clock_id, const struct __timespec64 *tp) { - /* Make sure the time cvalue is OK. */ - if (! valid_nanoseconds (tp->tv_nsec)) - { - __set_errno (EINVAL); - return -1; - } - #ifdef __ASSUME_TIME64_SYSCALLS # ifndef __NR_clock_settime64 # define __NR_clock_settime64 __NR_clock_settime