Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4045382imm; Sat, 21 Jul 2018 08:53:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfl0Z5noGaWFef940M9ibzLPl/YcMoXfhRaVfouYQzaRoG9ORDBxcwqOuH2LPN5EUr2my0k X-Received: by 2002:a63:d518:: with SMTP id c24-v6mr6089197pgg.357.1532188426703; Sat, 21 Jul 2018 08:53:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532188426; cv=none; d=google.com; s=arc-20160816; b=JK9upAR5E7VusPXgWuallJp097e4nPYxBzSSTQGbREuJnwXagUfvsPrgA0iiH+prTh sfvIE0wNIycIYYoe0lR7urJPJ2bl+5r4IwumgujCKzmVjlmQubrPwgJ1uttu3cz/Li2k 0HvxHCvtdoshKkXKLlxTGz6jnx5eHXD8bz8YRL4np0fG3uM7KyobuLeA+4/nlXfZ4jZe wE7X+7mFypFpVey6WllYFcVtHFLs1lZCYh6Qq/Qg331ekKSyZuJucTiA7tViwsn/+y/D JC4HREh4gaL3s3GxSkaCXKXDbaJw9Qi9yv04ZdxIwosRw647WmWkWaaLoM+9Qx+tZTRG ivtw== 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:dkim-signature:arc-authentication-results; bh=KTHvqFH3AZz5r4pe5oAfdbCuDGKY5xOHOj6DZzoRwzg=; b=Q5J1nS2cSxXG6weQ7C9gaG0WD5v/jjWKHaEfWzzHhV7sRTZZbgKyNSKwjYw6YLGXWx ijNGzZjYieowngxp7kCovc6HbBMR+0vwLFgTNgHiLrO+CZVdN8lS4u6osTFtn/etVHhV f/btVLiD8Ysgn55gU+5ZSUlp3/TymqSpub53sU0jWzm35eXqY6yNf0+t7J4p1ObOYyiw jr1pca3zudjYnqJzlMRZgaYaRgXGtGGoUUYUxNzBamL8QXtyMlaBabG/MPoRKqNlVvpV rSOW4FhUPMfMwUHte66qQ0meAJyK8uMPTEJuROFfGnxCDfybnzEAHR247NfmNgmhKtmF BkDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YYj1XXyC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j61-v6si4058019plb.68.2018.07.21.08.53.30; Sat, 21 Jul 2018 08:53:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YYj1XXyC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728110AbeGUQpt (ORCPT + 99 others); Sat, 21 Jul 2018 12:45:49 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46731 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727960AbeGUQpt (ORCPT ); Sat, 21 Jul 2018 12:45:49 -0400 Received: by mail-pg1-f193.google.com with SMTP id p23-v6so9204286pgv.13; Sat, 21 Jul 2018 08:52:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KTHvqFH3AZz5r4pe5oAfdbCuDGKY5xOHOj6DZzoRwzg=; b=YYj1XXyC50d4Ps80Ej4ntejXCt0XTXaLIUYhiUjbuVE5Qu6Zb1mw7miBVVSvoxNhnD we2U85F1nj+3nJwgPf+tpedAdTUPLIs3+Gq8LbmioJ3jez7FIXjIEcJzy6LT4spJqpcO bi6EUQO/vpZup3t2wMm56Rz3f/jUKtkHDMFkCCElId1kaEsN9vwqG3MoWlmgDdp8mMmw NHDR29Ncabf6FxJx0qJYcKqE7mcCktn9+WRZTmcAlhUIHAuLRbLIIHH9ZHlWAT/x3Dj6 GzdaSzt6nPOP7ggBciXwskYkPasaEsIVTriKI1XgadJMhBsd9Y/elPZmLCFvSuwwWIb5 63DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KTHvqFH3AZz5r4pe5oAfdbCuDGKY5xOHOj6DZzoRwzg=; b=QHAqE9SaR2tfr7ezARgzL973sIWhDe6j2wkfCgV7855htP/QYg4XJx8A//+8vDSfYJ twT5z1V45Xwf4lRVqsLgpnoUaZhK+GvzSaMrc4m+FX/k7aR4jxXBQ1dZITtA4HvBXPTH v4lNHGGF5wVX2Lw8wItXDvwAUGcCNLjz70b3H/rLR/zY1o7gZR6506QFrfbgXmBy4YJ8 wBkHjFXt8mPUvhAiBNOk/A/az1w+uKvOy74oxJ3xr91PrUGjH8KNNfmrw5C3jonXTNnk xGlVcG+3a+XX7n99AC+rqCGZ9QyxISMjytw0SOmfd/sYS0T92q1WVAdJDD+9WcYBF256 wIrw== X-Gm-Message-State: AOUpUlFtiDbUuyzRZgDnDxM2RzPKkfC5I/mSYu8ynHVzsKr5y7Z47kYp bvDolv/8og7Rbgu64VFB4XW+r+TH X-Received: by 2002:a63:844:: with SMTP id 65-v6mr6210173pgi.406.1532188357814; Sat, 21 Jul 2018 08:52:37 -0700 (PDT) Received: from himanshu-Vostro-3559 ([103.233.116.134]) by smtp.gmail.com with ESMTPSA id 8-v6sm7056251pfk.132.2018.07.21.08.52.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Jul 2018 08:52:37 -0700 (PDT) Date: Sat, 21 Jul 2018 21:22:30 +0530 From: Himanshu Jha To: Andy Shevchenko Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , Linux Kernel Mailing List , linux-iio , Daniel Baluta Subject: Re: [PATCH v4] iio: chemical: Add support for Bosch BME680 sensor Message-ID: <20180721155230.GB11127@himanshu-Vostro-3559> References: <1532122284-19602-1-git-send-email-himanshujha199640@gmail.com> <20180721161934.75066d97@archlinux> <20180721153607.GA11127@himanshu-Vostro-3559> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 21, 2018 at 06:43:51PM +0300, Andy Shevchenko wrote: > On Sat, Jul 21, 2018 at 6:36 PM, Himanshu Jha > wrote: > > >> > + /* Look up table 1 for the possible gas range values */ > >> > + u32 lookupTable1[16] = {2147483647u, 2147483647u, 2147483647u, > >> > + 2147483647u, 2147483647u, 2126008810u, > >> > + 2147483647u, 2130303777u, 2147483647u, > >> > + 2147483647u, 2143188679u, 2136746228u, > >> > + 2147483647u, 2126008810u, 2147483647u, > >> > + 2147483647u}; > > This one needs perhaps a bit of though, but... > > >> > + /* Look up table 2 for the possible gas range values */ > >> > + u32 lookupTable2[16] = {4096000000u, 2048000000u, 1024000000u, > >> > + 512000000u, 255744255u, 127110228u, 64000000u, > >> > + 32258064u, 16016016u, 8000000u, 4000000u, > >> > + 2000000u, 1000000u, 500000u, 250000u, 125000u}; > > ...this one obviously just a not needed one. You may replace it with a > one constant and simple calculation to get either value (index from > value, or value from index). Not sure to understand your opinion!? Anything related to increase to .ro segment ? I think adding is better to let compiler optimise the code a bit further. > -- > With Best Regards, > Andy Shevchenko -- Himanshu Jha Undergraduate Student Department of Electronics & Communication Guru Tegh Bahadur Institute of Technology