Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3368629pxj; Mon, 7 Jun 2021 08:59:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhmcW9is7z3RTmAXvlkC9bjf9zEE1OprtFO0l/9Tilss8iwBCq4T1ARSE/DJMt9XSjoP0N X-Received: by 2002:aa7:c983:: with SMTP id c3mr20662027edt.58.1623081541844; Mon, 07 Jun 2021 08:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623081541; cv=none; d=google.com; s=arc-20160816; b=iyyWhDCXGdzfIvuv6gsXL1YfStNUR+V06+LkSCfsHMtbYWq03uSuEnjXlUV74UyeEN 9XQSsBiY0s3ekmZdcZrrCDruhczrDnBQ6nS/4351pjctMGgQBEGbIeRzMk0ooTBV5XLv ya42+V26Rlu7FyWU4XM3RqH8TghZyzaos5LfhtE6KzUdGNKIJbcA/CNBfLFjfnBuOuQ0 MNXZQnfsxDDeyIhw73QJ/witbLK6MJVGlRbGbLBbLrUabOZLdbjAD+Q6LSnJmQDYik2j rODSHKBZFQ9AZTVPvLHW9LbQF9woi6MSk/ogx2M7w5HfPRMBqLewY2CgucJLWHBXoEmB C3kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=7ZTeQ7jF4iSqFRqga88+9PvY/TbZ4QvPWB7PFof1yXw=; b=XfqIgVgN9c+GvpvjTgjf6GjNZiX1vMmr/+FMDpfymOVtAg+rKLEDZaM0dszmXWoyr3 ShDlWd3WE0xYAC0aEFbJkTeDJQwWpKWNuKbNLeCjOTe6PTldhRrDG3X9kqq/GpAz6qVG K7mWCq2XABaH6IU0XTI+StuOeGtaup6cSDteKaw5AoE3EBdLvbbpPdNgAYnUKrWwcBK5 5OyJEtAVVkjdzkLc9FeckB+CtZtIvsGJJuQWsjqeLZ9WqXxVfqO2neKPMzjC2mBloJHC T9ni3nKsDReVzqxLc3UyuHIZMXZQHttsFaL9apBaPXc/lcqKi67coGrcJT5AZqmLSG/l cy9A== 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 yd19si12407377ejb.717.2021.06.07.08.58.38; Mon, 07 Jun 2021 08:59:01 -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 S230462AbhFGP7I (ORCPT + 99 others); Mon, 7 Jun 2021 11:59:08 -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