Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp561834pxb; Mon, 7 Feb 2022 19:00:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHIqUt3aZ+PShxn3hyeJf1zkyZWCfWkX2y4uT+rs12OavnaKadQEk1/zh2z9PVJdokuRlt X-Received: by 2002:a17:902:b60f:: with SMTP id b15mr2314943pls.88.1644289215799; Mon, 07 Feb 2022 19:00:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644289215; cv=none; d=google.com; s=arc-20160816; b=dZ3dKIqDHz6zf1EPpN6Iub2ooDKZQxmChEClZmrv6RGTSnG9t1zaWvCQTlOFdiOui4 h0omGzAR2YpvtvgOgZv/phfFAtpiL9wxrOBFjdnim8tgw5r5YGDjT7Q+3HzLuhC4r/cJ 0cgK4y50Pz7gWmLQaSK4JB0DEf72x9tb8llqQvYB6cNhlNrw8nuWZXCPdoMYNPObv7+O aak5vPufLeQ4MxUXgePfBVsTKbw/yoBneeQDiuQ5V61Wo/3oAiv3AIwrTj8al53djBiT 5oPOpPjV7uBfKHP6Sx4sk6raDWUBmVQqKTmoVQmVfh917kwoqcP6UasY30SgzIwGj45+ VxEA== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=6PqhnG+XT/uhpXUQbf2DDoJhcV1zcW5+sZDsZaBhum8=; b=p5ocz9+RzwhB3BgwU9Ri+IteXD59ioydUkvzgzF4+dkCL47nHydijPSzCG9Foo17+m YtByxxcAZPBArWpXwf4lgFzjGQkbblArtk5BIufGfxxtlOaQzlIg7JcaoLkRI6tJT3w3 FfpHFbH17masx6Slhjf4pcXVEYSVwzrd8ZMktSyTU3FWFKsxMjwAF0RARmvYAI+SAzLC v5vj4hdA9/5/a8M68EIbNPgUtVvuxDzcH9Fw4Ew06YtGgmerrgkRiFZzYy1R6zlD6/p1 ARTEQe5YqOGybRatovr4fYdSBO6j4fjZ64L9sGAcKOmAOMU8IIboCQEzxex2pSsBWyqc OzyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=guXIK2ny; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q15si10075186pfs.286.2022.02.07.19.00.03; Mon, 07 Feb 2022 19:00:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=guXIK2ny; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350284AbiBGJ11 (ORCPT + 99 others); Mon, 7 Feb 2022 04:27:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241258AbiBGJ0Z (ORCPT ); Mon, 7 Feb 2022 04:26:25 -0500 X-Greylist: delayed 63 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 07 Feb 2022 01:26:24 PST Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D3C2C043185; Mon, 7 Feb 2022 01:26:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644225984; x=1675761984; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=jOaWn8eBeotYB78WK3ufQ611JINmtK4Y3HLF7Flk3bw=; b=guXIK2ny5cITLhV3dPm7z5HQkeiftJwpP82TMRlDf3H1/x2FrUh7Pv02 ZFZMGgqlZ3SJXBki3e4N5VSkXjoA3FhZORVWZXtF/eE+ZRawlGllGIEQu 3Vrcp1IBjDcMdHAz+AZr/FVfzthN8Xs9+7HuUeUuxF/juk2zEyPalOEP3 0Xjl3MuAp10NYa5CwaGopmxbGqv0a0/rtKjSnMKXFuWYBZqatdDlUfjbK zk9115fIPkrJpVl64UHJgYJx538jX7SSylzgwnuOEOvDfu1ENky+Mt2nT 5nRVUdXFJ4xIKorB47dwCldxDZS7OBr4LjAHxk3rcpGA5LKxBdBFArMue g==; X-IronPort-AV: E=McAfee;i="6200,9189,10250"; a="311977936" X-IronPort-AV: E=Sophos;i="5.88,349,1635231600"; d="scan'208";a="311977936" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2022 01:25:21 -0800 X-IronPort-AV: E=Sophos;i="5.88,349,1635231600"; d="scan'208";a="484357501" Received: from smile.fi.intel.com ([10.237.72.61]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2022 01:25:19 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nH0Fw-001poW-Th; Mon, 07 Feb 2022 11:24:20 +0200 Date: Mon, 7 Feb 2022 11:24:20 +0200 From: Andy Shevchenko To: "Sa, Nuno" Cc: Jonathan Cameron , "linux-iio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Lars-Peter Clausen Subject: Re: [PATCH v1 2/2] iio: temperature: ltc2983: Make use of device properties Message-ID: References: <20220203114506.53904-1-andriy.shevchenko@linux.intel.com> <20220203114506.53904-2-andriy.shevchenko@linux.intel.com> <20220205171454.49a7225c@jic23-huawei> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 06, 2022 at 12:51:00PM +0000, Sa, Nuno wrote: > > From: Andy Shevchenko > > Sent: Saturday, February 5, 2022 7:24 PM > > On Sat, Feb 05, 2022 at 05:14:54PM +0000, Jonathan Cameron wrote: > > > On Thu, 3 Feb 2022 13:45:06 +0200 > > > Andy Shevchenko wrote: ... > > > > +#include > > > > +#include > > > > > This may well be a valid addition but it's not called out in the patch > > > description. > > > > This is a side effect of the change. Below I will try to explain, tell me if > > that is what you want to be added to the commit message (feel free to > > correct > > my English). > > > > The conversion slightly changes the logic behind property reading for > > the > > configuration values. Original code allocates just as much memory as > > needed. > > Then for each separate 32- or 64-bit value it reads it from the property > > and converts to a raw one which will be fed to the sensor. In the new > > code > > we allocated the amount of memory needed to retrieve all values at > > once from > > the property and then convert them as required. > > Yeah, I understood what you are doing... We allocate some extra bytes so > that we can simplify a lot the logic to get, convert and put back the properties > in the table... And since we are only writing the __real__ table size into the device > I'm fairly positive this works. However, I do agree with Jonathan and I would > be more confident to give this a test before being applied... > > That said, I'm off till the end of the month (just doing minor stuff like replying > to emails :)), so if we can hold this one, I will test it first thing I'm back in the > office. Will wait for your testing. Meanwhile I address all other comments and send v3 for further review. -- With Best Regards, Andy Shevchenko