Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp2365382img; Sun, 24 Mar 2019 06:54:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+n/byHZ3ypAjibym/ynavDno0rzw8ZJU7PiFHRNiEWQOJo7901TNeLugjrz9VtFJGiGBr X-Received: by 2002:a17:902:7b90:: with SMTP id w16mr20363862pll.228.1553435656960; Sun, 24 Mar 2019 06:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553435656; cv=none; d=google.com; s=arc-20160816; b=ORVyvn2FB56tBuAOOtOeUgBvRMKJMgZxLTBAj+wLfMRSYFk5EvWtgGfuM108hb6Zjm M456U7dFF4B84HoVaVZAwXhLrh/7/eqDFzLcKU4VepL41dO+TL90tZtkK0x1bHb/VAA0 pOf9uAReTJ22aXOhC8PNp7/vbCfoDFHbiNUnnjmn1LFHhKPgEp7AXtuN+9Fc0AzyCt2F Wvd5TVuA2FzDXRYompL4KcELL10oHscNGhGxXZ2NYpVa38nhEAnNtz7hZ2fhKOiNQ5HH aul6SROVhSAIeUkwVvY5W+/VvDZoXS8RmxUfLgw9Gml08qKg3R0vnsLtjVQ9Ylu/yfcb fQcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=hBuw6irV2MzbUiWPIhYNiC4XZFUyXmMJnSWDCjnNhY4=; b=KKtVLf6Wkb8qJ6jjKq9LxwOOLHzPjju9ntQ8woYawrzpTCKVJsNCQJorYbl1c1wXUz +KCVGm8IcBLjRdcZDR0nAEnfLSNAVqOGvjPSEuuG6iBeEL/S92OsubVfbq1UbNjtI6qj CY1Ny8AEXsiSJv3QPnLJOWktSoCYYoUi2YKTjCslaRa9uXUBmaenvgEJ7vNHEjzB2q0n IJpxg4tXlZyXfp+URby62tSjZ3MoCMvJTVDLS1Q1Vu43Cp3OYzP1QpPpocwqk0BmfOsO 4oqGrjQkwrv28woO1Jz10sPb9Lky2Kw4PUzlM7a+lIKFZKdcJSZyMQ2pFhP9wWP0DkDI tLnQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11si11572080plk.323.2019.03.24.06.53.49; Sun, 24 Mar 2019 06:54:16 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727249AbfCXNwx (ORCPT + 99 others); Sun, 24 Mar 2019 09:52:53 -0400 Received: from mga01.intel.com ([192.55.52.88]:35993 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726877AbfCXNww (ORCPT ); Sun, 24 Mar 2019 09:52:52 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Mar 2019 06:52:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,256,1549958400"; d="scan'208";a="128204874" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by orsmga008.jf.intel.com with ESMTP; 24 Mar 2019 06:52:48 -0700 Received: from andy by smile with local (Exim 4.92) (envelope-from ) id 1h83YN-00029j-JU; Sun, 24 Mar 2019 15:52:47 +0200 Date: Sun, 24 Mar 2019 15:52:47 +0200 From: Andy Shevchenko To: William Breathitt Gray Cc: linus.walleij@linaro.org, akpm@linux-foundation.org, linux-gpio@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux@rasmusvillemoes.dk, yamada.masahiro@socionext.com, bgolaszewski@baylibre.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v10 10/10] thermal: intel: intel_soc_dts_iosf: Utilize for_each_set_clump8 macro Message-ID: <20190324135247.GG9224@smile.fi.intel.com> References: <20190322190243.GA9224@smile.fi.intel.com> <20190324033747.GA7697@icarus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190324033747.GA7697@icarus> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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 On Sun, Mar 24, 2019 at 12:38:29PM +0900, William Breathitt Gray wrote: > On Fri, Mar 22, 2019 at 09:02:43PM +0200, Andy Shevchenko wrote: > > On Thu, Mar 14, 2019 at 09:32:57PM +0900, William Breathitt Gray wrote: > > > Utilize for_each_set_clump8 macro, and the bitmap_set_value8 and > > > bitmap_get_value8 functions, where appropriate. In addition, remove the > > > now unnecessary temp_mask and temp_shift members of the > > > intel_soc_dts_sensor_entry structure. > > > > One comment below, otherwise > > Tested-by: Andy Shevchenko > > Thanks! > > Thank you for testing out the patch. I'll fix the bug your pointed out > and add the Tested-by line. > > I have a couple minor comments below. > > > u32 store_ptps; > > > - out = (store_ptps & ~(0xFF << (thres_index * 8))); > > > - out |= (temp_out & 0xFF) << (thres_index * 8); > > > + update_ptps = store_ptps; > > > + bitmap_set_value8(&update_ptps, 32, temp_out & 0xFF, thres_index * 8); > > I chose to hardcode a bitmap width of 32 here because that is the width > of the store_ptps variables, but I don't think we necessarily use all 32 > bits here. Would the actual width of store_ptps be the number of > writable trip count bits (writable_trip_count * 8)? I think 32 is okay, but sizeof(store_ptps) would be better. It's easy to read since no need to check what is the actual size inside this variable is used. Same for below. -- With Best Regards, Andy Shevchenko