Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3222375pxj; Mon, 7 Jun 2021 05:35:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZfxlsW27prfQGV5eFdJlXdkfpYodMPgjS2VJTChtO2N8uiLK0iM6nd65+xeS7lc/q6oi2 X-Received: by 2002:a50:9549:: with SMTP id v9mr19791534eda.312.1623069323034; Mon, 07 Jun 2021 05:35:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623069323; cv=none; d=google.com; s=arc-20160816; b=bMsUtPTBFvqqNZFchz71Dh5Xn9bz66Q988lFXW0Wi6bRjbCEiceQSyhKP11uPg1NlO ZA3k23oZ2ESmrsxP/5SirkRgm6ly3qFa/eQYZX3/9s+O3e/iqO9zkCsI3tFTFuhibnFk SF0q4LW/0sjQ1nSraJ8y52RxYaCfVoDmDyzeu3rtCCKPBk1xUUZier1GnsnSEWdUVqz8 jCLai2r6dKogEw6XmYZc9zTbGRdKVRTg74MP7q4IVFjL3KbZDF5dJY3xcKLt0WzdklZr SOJg2SHEXA+Iko9NQWEaUcXj8M6pIm53XkpPw6J02qgLqjW3pJJ1tZ2mKOGf9EzrVKOl tD2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=D5gMSYacBbM2ylFE6pkiGEHwa96P/bF7fVirf7eaIws=; b=lMRgChHmsXQgItTrflOcg8HJKD2hg+xiGD48G9cr+D7Fh/5qrWmUAE13oNhxJhiXFU iq7pNoEZ63LknBoBYANA3eox0NFsGgTSVsaf8JmUcWgf01ui4xQbOEOQ8RGSRW6qgRPL PTUGxxRYm6yTBpu4v+7+d574vT3YIGNi+8RBruRdrdRKZKB5MYrI3MwMLr2AzUHoZlRB Pru9X2w895xX9Zzsr9tlaQTv2786GJBZZIIO7/GW/oyDlyBmpWq3G1hSsNAUb0yPUnm6 grxqbzMwtLKTWgPPKAl80Jwx5x6IQIN5gHOHWemB9/4ZJcrj7kPe2wyWITWFOLfD9opv Iqnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si15490064edj.328.2021.06.07.05.35.00; Mon, 07 Jun 2021 05:35:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230241AbhFGMfZ (ORCPT + 99 others); Mon, 7 Jun 2021 08:35:25 -0400 Received: from mga03.intel.com ([134.134.136.65]:5916 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230173AbhFGMfZ (ORCPT ); Mon, 7 Jun 2021 08:35:25 -0400 IronPort-SDR: sK/bxTUKGvQ+vWEYV0d2GC+VD3E9U1Gwi8rIVAEnzQgqwkJ5uMWenhk+6R26/fewX2I3IqLWdJ V7t2UW1wIPvg== X-IronPort-AV: E=McAfee;i="6200,9189,10007"; a="204633492" X-IronPort-AV: E=Sophos;i="5.83,255,1616482800"; d="scan'208";a="204633492" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2021 05:33:33 -0700 IronPort-SDR: JEXsAk3Fw2gtxxOdV1utxw6X6djNC5a+3kbcsAyrtgL4Ztzu2bwFvqoz21p/1KFyjK3hJbDcwo Pvaviz6MP4lg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,255,1616482800"; d="scan'208";a="551869337" Received: from mylly.fi.intel.com (HELO [10.237.72.153]) ([10.237.72.153]) by fmsmga001.fm.intel.com with ESMTP; 07 Jun 2021 05:33:32 -0700 Subject: Re: [PATCH resend v1 1/3] units: Add SI metric prefix definitions To: Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , wsa@kernel.org References: <20210603160433.35816-1-andriy.shevchenko@linux.intel.com> From: Jarkko Nikula Message-ID: <0466dab7-f2d2-3b7c-52a6-a12a6b09a67f@linux.intel.com> Date: Mon, 7 Jun 2021 15:33:31 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210603160433.35816-1-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/3/21 7:04 PM, Andy Shevchenko wrote: > Sometimes it's useful to have well-defined SI metric prefix to be used > to self-describe the formulas or equations. > > List most popular ones in the units.h. > > Signed-off-by: Andy Shevchenko > --- > include/linux/units.h | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/include/linux/units.h b/include/linux/units.h > index dcc30a53fa93..7366fcd45ec2 100644 > --- a/include/linux/units.h > +++ b/include/linux/units.h > @@ -4,6 +4,22 @@ > > #include > > +/* Metric prefixes in accordance with Système international (d'unités) */ > +#define PETA 1000000000000000LL > +#define TERA 1000000000000LL > +#define GIGA 1000000000L > +#define MEGA 1000000L > +#define KILO 1000L > +#define HECTO 100L > +#define DECA 10L > +#define DECI 10L > +#define CENTI 100L > +#define MILLI 1000L > +#define MICRO 1000000L > +#define NANO 1000000000L > +#define PICO 1000000000000LL > +#define FEMTO 1000000000000000LL > + For me milli is always 1/1000. Might lead to confusion with these defines if idea is to multiply with KILO but divide with MILLI? Jarkko