From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADBEDC47082 for ; Mon, 7 Jun 2021 15:57:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9600F6108E for ; Mon, 7 Jun 2021 15:57:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230494AbhFGP7J (ORCPT ); Mon, 7 Jun 2021 11:59:09 -0400 Received: from mga18.intel.com ([134.134.136.126]:40134 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbhFGP7H (ORCPT ); Mon, 7 Jun 2021 11:59:07 -0400 IronPort-SDR: x2OkIVTSiRqXAUxR4TbRXg6dqvlr8d9Tzg9zWXTRKTKOPrLI/9ynccbyspHe02SlHAU6RcJRMG QXh7wwmnHnaQ== X-IronPort-AV: E=McAfee;i="6200,9189,10008"; a="191976191" X-IronPort-AV: E=Sophos;i="5.83,255,1616482800"; d="scan'208";a="191976191" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2021 08:57:15 -0700 IronPort-SDR: Mjg2ogYAsPiGswkaDtMJ8xZZa5NW5nWMk2JGKsvQc1jmoc2pVOR5/TX8TS1B4Vlt1OStTfaGP5 I884SzezzcwA== X-IronPort-AV: E=Sophos;i="5.83,255,1616482800"; d="scan'208";a="449136178" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2021 08:57:13 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lqHck-000INZ-MJ; Mon, 07 Jun 2021 18:57:10 +0300 Date: Mon, 7 Jun 2021 18:57:10 +0300 From: Andy Shevchenko To: Joe Perches Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Jarkko Nikula , Mika Westerberg , wsa@kernel.org Subject: Re: [PATCH v2 1/3] units: Add SI metric prefix definitions Message-ID: References: <20210607152344.57458-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 07, 2021 at 08:43:02AM -0700, Joe Perches wrote: > On Mon, 2021-06-07 at 18:23 +0300, Andy Shevchenko wrote: > > Sometimes it's useful to have well-defined SI metric prefix to be used > > to self-describe the formulas or equations. ... > > +/* 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 > Somewhat surprisingly to me, this seems safe. > > (though I suggest using UL and ULL rather than L and LL) Okay. > The only use of any of these seems to be: > > sound/pcmcia/vx/vxp_ops.c: [VX_MICRO] = 0x0c, // MICRO > sound/pcmcia/vx/vxp_ops.c: vx_outb(chip, MICRO, level); > sound/pcmcia/vx/vxp_ops.c: vx_outb(chip, MICRO, vx_compute_mic_level(chip->mic_level)); > > and these vx_outb uses are themselves macros that prepend VX_ to the 2nd arg. Is it a real issue there? (Yes, I saw it, but I didn't check compilation in the assumption that units.h is not anyhow included in that file). Okay, I have compiled it, no problems registered. -- With Best Regards, Andy Shevchenko