Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3917986pxj; Tue, 8 Jun 2021 01:46:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxePuDedpRN2NB3cjiOugHhUd47AMIoyqSBLURAGDYNyeIr2ja4qaIplxxABCSeRMliIAJE X-Received: by 2002:a17:906:9715:: with SMTP id k21mr22341196ejx.553.1623141976444; Tue, 08 Jun 2021 01:46:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623141976; cv=none; d=google.com; s=arc-20160816; b=1CwD678x4Ya9YXHRB6dt8LYeFKXU1KLivm8P2WVaQh5yBcXMQqjXyxwlFW5nf9eu4q PipK+uNi7tSNM8xZaASYXrIzeLkj+JIf80k2HDaF5TT0HIld/k1BKlO1W+BUXl6XciBJ HWZJnGkQwGu9KYmt3Orxd4JnMMXmcktT5z9Iiysdk1OI+a/qr+Rp6w6Qs2+UGvK13xt4 K3U/v6l7qDxAbftRiwVlAdFZzUawWzjev3k/0NWpIdCoBzZBPnFbuBCAFXcplkpcU0CZ AskGZQf2nGzhfHHnKhDTqXGYMNUzRz1qPoJik9qoyENO1/SHAVB3xGCx/nLVbY1Iv4b4 MNQA== 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=d9C5qPvhmjoQvUcF3ltSiq3IKt+pCAAC2ClMNAQV2N4=; b=Igt03b7ubedCY51AG9td1ljPlQSp0kI9tlg9pIk9689Sujs99rdMHJ/AshQJNWOayN HS+m/U6vkB0jkUgaJ6EGEzohcwZQRxXEYLbOfSza82yAgAyTDT/0Hh/h8G3D0l7yl8Yg QRjw9JBH+9Vf7QxjWdi6zOzips5e6tSyR49FCRig3ency1l2BBAku6GMJN3WbT0ST2WI vSx57YEAi3CEmb2Yiq/rIrPhSiI7YEaI0rv2hdErI98re4So5HdIovwIRm1aQe+VpKxK g5skRSNiqGI1ZjWmsdFbMIq0qxEZ+slFuHEzzgdecS6se6c3a/bHgVGDgbb5CO5h7Jk5 CLEw== 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 u21si14469953ejz.696.2021.06.08.01.45.53; Tue, 08 Jun 2021 01:46:16 -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 S231177AbhFHIoq (ORCPT + 99 others); Tue, 8 Jun 2021 04:44:46 -0400 Received: from mga14.intel.com ([192.55.52.115]:25207 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230371AbhFHIop (ORCPT ); Tue, 8 Jun 2021 04:44:45 -0400 IronPort-SDR: 9uOc8NPw05lJdOGoH2omPZBHyWlGsnVcuagX7gchIy4G/QCS/B85MzzLFsttnU6M4iE/99rmRr Bf12OuNGkNIw== X-IronPort-AV: E=McAfee;i="6200,9189,10008"; a="204616263" X-IronPort-AV: E=Sophos;i="5.83,257,1616482800"; d="scan'208";a="204616263" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 01:42:53 -0700 IronPort-SDR: V0Ov13dmGK4COhb7BFnuyeEIcn4E/RTcO4o6wnoaTZm2qViByR++L9wZq7hJcci0VxCnImiEjA CjTtXNJQbn/g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,257,1616482800"; d="scan'208";a="447821292" Received: from unknown (HELO [10.237.72.51]) ([10.237.72.51]) by orsmga008.jf.intel.com with ESMTP; 08 Jun 2021 01:42:47 -0700 Subject: Re: [PATCH v2 1/3] units: Add SI metric prefix definitions To: Joe Perches , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , wsa@kernel.org References: <20210607152344.57458-1-andriy.shevchenko@linux.intel.com> From: Jarkko Nikula Message-ID: Date: Tue, 8 Jun 2021 11:42:46 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/7/21 10:09 PM, Joe Perches wrote: > On Mon, 2021-06-07 at 18:23 +0300, Andy Shevchenko wrote: >> +#define HECTO 100L >> +#define DECA 10L > > Should it be DECA or DEKA or both? > > https://www.nist.gov/pml/weights-and-measures/metric-si-prefixes > deka Example: dekameter da 10**1 Ten > >> +#define DECI 10L >> +#define CENTI 100L >> +#define MILLI 1000L >> +#define MICRO 1000000L >> +#define NANO 1000000000L >> +#define PICO 1000000000000LL >> +#define FEMTO 1000000000000000LL > > IMO: Might as well include all the prefixes up to 10**24 > > EXA ZETTA YOTTA, ATTA ZEPTO YOCTO > > And how do people avoid using MILLI for KILO, MEGA for MICRO, etc... > The compiler won't care but usage could look odd. > I find this patch creates more confusion than solves a real problem (typo where one zero is missing or one extra) and adds potentially needless churn. For instance I don't assume much use for the HECTO now or in the future. How about if absolutely necessary just adding only KILO, MEGA and GIGA and questionable defines only after when the real needs arises and can see does "1/1000L" etc define cause any troubles to real calculations? Jarkko