Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1610611imm; Wed, 20 Jun 2018 23:02:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIUWFTBuc2cxGJ1rY+PiefGPnwgNJtA0y09VnSHIjgbxYZpN7VvjKt8BgvF/SPOq/o+ojha X-Received: by 2002:a62:3c15:: with SMTP id j21-v6mr26004865pfa.7.1529560961600; Wed, 20 Jun 2018 23:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529560961; cv=none; d=google.com; s=arc-20160816; b=x2dHZQEevc9x2U1xV7rd3Uc94whPYVWcPgH38JAtc4rqvnwcz+nYjB74MihcNQ96ig Q5zBPGcdmIIhJfolP4uU3HNcOCGCXXuf+WNuKeEwXpdq04ED/aJtPreQf5rBBsi692s6 mll3T0bR/jNUnHfnFPW1Fx4xhozq3p5K16RpPgGXI2l0NT2HBM6ntZmtFkiAPg4aCDSi HFXlLc+iinsS/z4KVygoFV3XwBCJkO9a+rxeAxz4N7/GWNGMUApBlZ1O0i0pYg0x3bNP QbNih05t5JGEEn5YVDj8ra38RDu/azQkpNSnWUkXV/F+gErXgGDQtRrahQEaZIcFfVa6 VWLA== 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:from:subject:cc:to:message-id:date :arc-authentication-results; bh=3SzonDxiuL4qy5OwLEhEv+c/ABF0kEB8Rzylr0NOHJE=; b=DYdeZR2hbWub+Ka9wMtGbINN+wVvonMNGryOaNHdZtmr4kQTb0NdC3cID8sEaanaWH UBY0vpfipmJ7GM9K8qOQGv4E5nA57Pwbkxky3mgpEd2fVFxWzVzQdeOhJEIpnsvJOiam MBrIhIrP/RLdYW/Ct0lraEyGUa1b3Xvj4Db3gKssoeosfKIGa+17tFkr9T/b1Cto/Usv EC0D4hbxCq7K6EMnMelou/K2k0VHBh0Qo1eSE8fj0yGDSv2jswI727XpQqbOFCrfww05 Npfiat1zSr0gvU/+lgEdk8EmVwvTHaRIeRTkTp0JshUIS+QnCwH/oEUFjIFWDOUthM2Y iyGQ== 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 h4-v6si3249725pgp.490.2018.06.20.23.02.27; Wed, 20 Jun 2018 23:02:41 -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 S1751388AbeFUGBp (ORCPT + 99 others); Thu, 21 Jun 2018 02:01:45 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:49908 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750818AbeFUGBo (ORCPT ); Thu, 21 Jun 2018 02:01:44 -0400 Received: from localhost (unknown [112.167.33.120]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 402531469D448; Wed, 20 Jun 2018 23:01:43 -0700 (PDT) Date: Thu, 21 Jun 2018 15:01:40 +0900 (KST) Message-Id: <20180621.150140.1170551679722502944.davem@davemloft.net> To: harini.katakam@xilinx.com Cc: nicolas.ferre@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, michal.simek@xilinx.com, harinikatakamlinux@gmail.com Subject: Re: [PATCH] net: macb: Fix ptp time adjustment for large negative delta From: David Miller In-Reply-To: <1529494460-4689-1-git-send-email-harini.katakam@xilinx.com> References: <1529494460-4689-1-git-send-email-harini.katakam@xilinx.com> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 20 Jun 2018 23:01:44 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Harini Katakam Date: Wed, 20 Jun 2018 17:04:20 +0530 > When delta passed to gem_ptp_adjtime is negative, the sign is > maintained in the ns_to_timespec64 conversion. Hence timespec_add > should be used directly. timespec_sub will just subtract the negative > value thus increasing the time difference. > > Signed-off-by: Harini Katakam Applied and queued up for -stable.