From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752332AbcBAIoX (ORCPT ); Mon, 1 Feb 2016 03:44:23 -0500 Received: from www.linutronix.de ([62.245.132.108]:37159 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751194AbcBAIoW (ORCPT ); Mon, 1 Feb 2016 03:44:22 -0500 Date: Mon, 1 Feb 2016 09:43:14 +0100 (CET) From: Thomas Gleixner To: "Zengtao (B)" cc: Arnd Bergmann , LKML , Frederic Weisbecker Subject: RE: [PATCH] cputime: Fix timeval-->cputime conversion In-Reply-To: <678F3D1BB717D949B966B68EAEB446ED0A6B5423@SZXEMA509-MBX.china.huawei.com> Message-ID: References: <1453964546-111074-1-git-send-email-prime.zeng@huawei.com> <2202801.VajSj19nWd@wuerfel> <678F3D1BB717D949B966B68EAEB446ED0A6B4B94@SZXEMA509-MBX.china.huawei.com> <2048669.ftH2CRoGds@wuerfel> <678F3D1BB717D949B966B68EAEB446ED0A6B5423@SZXEMA509-MBX.china.huawei.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Feb 2016, Zengtao (B) wrote: > Hi Arnd: > I have got a new idea about the problem: > In include/linux/time64.h > #define NSEC_PER_SEC 1000000000L > I think we should change it to > #define NSEC_PER_SEC 1000000000LL > > My reason is : > 1. when it is used in a multiplication, it will easily get overflow. > 2. when it don't get overflow, the change has no side affect. That's not a good idea. NSEC_PER_SEC is used in lots of places with 32bit storage. I really don't want to mop up all the fallout. Thanks, tglx