Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp91216ybg; Mon, 8 Jun 2020 17:18:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycRtOdt+1PP2UXPfz2EkKQLMyd0twnGH2YjVXg2mLQtm3iaepDvXdmU4bwMBbIQe8gdm+N X-Received: by 2002:a17:906:4406:: with SMTP id x6mr22839262ejo.160.1591661894694; Mon, 08 Jun 2020 17:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591661894; cv=none; d=google.com; s=arc-20160816; b=pECobMzjzLVxmIsSimtpTd0MFZNmneQoNF9LxKrf/k2W0x/eZzYmERCvdOcQvptYWE fDnmI0zcINpV8/F5+01BLFIgCIebFluQ5cdkw2IaCept8yP3osN7epl1l+pGDysKZBLU VU09Q4kSzz0ZOz3r8Mwftj6dDWt+ISF9LO6JbZcnE50XDZsrbf1if+jVvqETWm0XdWid UpUAEF+wTSfVxHKiyFw1YABAuz9ma3oRLhfj+YmB/eACwCvRCmLKHMSLRGotIQDjfpEs S0/gWvbd8VeMnZvfOyJ7ifGtHCWMAf3ODoh6/I6rPcnzXXec0Ae4Rs9W421TGN62nz8O An+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=CxrWeq5g+04TdNPHNtqy3HjgckPKEjWP+WHGQF0odpo=; b=t29Aqwiq7lLBBDZGMU7wOjJyFHnpRNIEHlxUdHDKt3mr5x0hh+Nk9314wu0pAhkAvL PBckLYUoJn9WpLZUTrpDLjHqGJQAJkQphVDMzSWNsqUchdkewBiCzsZf0O5zb0MTl2iy ysR7K5LVVuC5bfj3IEJjR33CQT3F+gS2TIMy2YYgdUSO1OVYA0HANJTUfdov+ZWup0Sg 9mnBouyKVuccgUc4YVQnH9eHfM9Yfv6fyEOT/x9ZSN7Zgftkgodjl7F/tRwkZL4MisY0 ipm1yEetHXLfa5dOkZWhhnfzFm0jUzKkRmm4YLZihuvoDCP3SDWv9OIiUQfaatBldJtd QMZw== 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 h4si9370760ejg.735.2020.06.08.17.17.51; Mon, 08 Jun 2020 17:18:14 -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 S1732886AbgFIAQK (ORCPT + 99 others); Mon, 8 Jun 2020 20:16:10 -0400 Received: from mga07.intel.com ([134.134.136.100]:19508 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732892AbgFIAPW (ORCPT ); Mon, 8 Jun 2020 20:15:22 -0400 IronPort-SDR: Z2XkLtwfSAslRmJZ3d7rk5/cuWRpnInUN2YW9JdmQAnTlxopkWLsYG7782hdQ2ihYXF0fr7ldQ ha3w3KEol9iA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2020 17:15:22 -0700 IronPort-SDR: qbPVQki+36XgabtS5oHGJy8ZtNY2h1ErJWojOu92iiJpE6H/FNYnEEV0Zuwe6ir3rSdGZ7lwNE vQhFwRYuYNtQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,489,1583222400"; d="scan'208";a="418227405" Received: from lkp-server01.sh.intel.com (HELO 12d5c0ac8e64) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 08 Jun 2020 17:15:20 -0700 Received: from kbuild by 12d5c0ac8e64 with local (Exim 4.92) (envelope-from ) id 1jiRvD-00001V-Fz; Tue, 09 Jun 2020 00:15:19 +0000 Date: Tue, 9 Jun 2020 04:18:56 +0800 From: kernel test robot To: Tomasz Duszynski , linux-iio@vger.kernel.org Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, jic23@kernel.org, andy.shevchenko@gmail.com, pmeerw@pmeerw.net, Tomasz Duszynski Subject: Re: [PATCH v5 1/4] iio: chemical: scd30: add core driver Message-ID: <202006090426.ENCJHJ1n%lkp@intel.com> References: <20200607175812.95777-2-tomasz.duszynski@octakon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200607175812.95777-2-tomasz.duszynski@octakon.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tomasz, I love your patch! Perhaps something to improve: [auto build test WARNING on iio/togreg] [also build test WARNING on robh/for-next linux/master v5.7] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Tomasz-Duszynski/Add-support-for-SCD30-sensor/20200608-020304 base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot cppcheck warnings: (new ones prefixed by >>) >> drivers/iio/chemical/scd30_core.c:93:31: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] sign = float32 & BIT(31) ? -1 : 1, ^ vim +93 drivers/iio/chemical/scd30_core.c 87 88 /* simplified float to fixed point conversion with a scaling factor of 0.01 */ 89 static int scd30_float_to_fp(int float32) 90 { 91 int fraction, shift, 92 mantissa = float32 & GENMASK(22, 0), > 93 sign = float32 & BIT(31) ? -1 : 1, 94 exp = (float32 & ~BIT(31)) >> 23; 95 96 /* special case 0 */ 97 if (!exp && !mantissa) 98 return 0; 99 100 exp -= 127; 101 if (exp < 0) { 102 exp = -exp; 103 /* return values ranging from 1 to 99 */ 104 return sign * ((((BIT(23) + mantissa) * 100) >> 23) >> exp); 105 } 106 107 /* return values starting at 100 */ 108 shift = 23 - exp; 109 float32 = BIT(exp) + (mantissa >> shift); 110 fraction = mantissa & GENMASK(shift - 1, 0); 111 112 return sign * (float32 * 100 + ((fraction * 100) >> shift)); 113 } 114 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org