Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751596AbWCOKXR (ORCPT ); Wed, 15 Mar 2006 05:23:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751591AbWCOKXR (ORCPT ); Wed, 15 Mar 2006 05:23:17 -0500 Received: from pentafluge.infradead.org ([213.146.154.40]:57570 "EHLO pentafluge.infradead.org") by vger.kernel.org with ESMTP id S1751472AbWCOKXR (ORCPT ); Wed, 15 Mar 2006 05:23:17 -0500 Subject: Re: [Patch 1/9] timestamp diff From: Arjan van de Ven To: nagar@watson.ibm.com Cc: linux-kernel In-Reply-To: <1142296939.5858.6.camel@elinux04.optonline.net> References: <1142296834.5858.3.camel@elinux04.optonline.net> <1142296939.5858.6.camel@elinux04.optonline.net> Content-Type: text/plain Date: Wed, 15 Mar 2006 11:23:13 +0100 Message-Id: <1142418194.3021.8.camel@laptopd505.fenrus.org> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 595 Lines: 18 > +static inline void timespec_diff(struct timespec *start, struct timespec *end, > + struct timespec *ret) > +{ > + ret->tv_sec = end->tv_sec - start->tv_sec; > + ret->tv_nsec = end->tv_nsec - start->tv_nsec; > +} > #endif /* __KERNEL__ */ I'd suggest normalizing the timespec; better to do it in such a function than in all callers of it.. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/